Quick question - access attributes through form helper?


#1

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]