Forum: Ruby on Rails Quick question - access attributes through form helper?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mark D. (Guest)
on 2009-06-01 16:41
So within a form_for/fields_for can I access the field attributes.
[code=ruby]<%= form.text_field :name %>#gives me a text box with the
value of :name %>
<%= form.label :name %>#gives me a label with 'name' when I need the
value of :name %>
  # Can I also do something
<%= form.text_field :category %>#gives me a text box with true or false
%>
 <% if :category %> # access an attribute in this way in order to affect
condition??[/code]
This topic is locked and can not be replied to.