[Rails-core] Re: RFC: Safely accessing the params hash

Michael Schuerig
2005-08-08T17:13:16Z

On Monday 08 August 2005 12:40, Michael Schuerig wrote:
> For has_(and_belongs_to_)many associations, I use nested
> hashes/arrays in @params (ActionController#params). Thus, @params may
> look like this
>
> { :id => 1,
>
>   :employee => { :lastname => "new lastname"
>                  :task_ids => [1, 2, 3] }
>
> }
>
> Of course, I''d like it best if new/create/update_attributes would
> handle this automatically behind the scenes, i.e., call
> employee.task_ids = [1, 2, 3]. (A)

Mea culpa. It already does... How did I miss this? Thanks, David.

Michael

--
Michael Schuerig                  Failures to use one''s frontal lobes
mailto:michael@schuerig.de        can result in the loss of them.
http://www.schuerig.de/michael/   --William H. Calvin