« Return to Thread: Question on attr_protected and attr_accessible

Re: Question on attr_protected and attr_accessible

by Frederick Cheung-2 :: Rate this Message:

Reply to Author | View in Thread




On Jul 9, 3:32 pm, "Älphä Blüë" <rails-mailing-l...@...>
wrote:
> Frederick Cheung wrote:
>
> Thanks for the clarification Fred.  So, how would I implement this in my
> edit view template?  Or, are you stating it can't be done there but
> somewhere else?
>
It's nothing to do with the view template. You need to assign the
relevant attribute by hand in your controller (presumably after
checking that it is allowed).

Fred

> <%= f.label :admin? %><br />
> <%= f.check_box :admin %>
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Question on attr_protected and attr_accessible