On Jul 30, 9:54 am, D <demetri...@hotmail.com> wrote:s:
>
> def move_stu
>   Enrollment.update_all(["course_id = ?", id ], :student_id => params
> [:student_ids])
>
>   ##
> end
>
> but all that passes in is a random 8 digit id from ??? (not the :id
> from the collection_select)
>

The id you are using there is the id of the current controller
instance. Just as you pick the student_id out of the params hash, the
course will be somewhere in params too. If you look in your
development.log or play around in the debugger you should be able to
figure out where in the params hash it is.

Fred
> Any ideas??? thank you in advance!
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to