cloper wrote:> The problem is when you drag&drop, it does post to the action, but
> the passed parameters are :id, which is @item.id, characteristic.id
> is nowhere to be found. I''m assuming there is an issue with the
> routes not passing the additional parameter.
You are right -- because the route isn''t nested, the URL and path
helpers have no knowledge about passing on other variables. This is not
to say that I recommend nesting the resource, because that wouldn''t
seem
to reflect reality.
What you can always do is post additional variables by using the
old-school { :controller, :action, :var1, :var2, :varx } hash (which in
no violates RESTfulness) or simply name the drag & drop element as
"characteristic_id" and do a quick @characteristic =
Characteristic.new(params[:characteristic_id]) in your controller.
--
Roderick van Domburg
Nedforce <http://www.nedforce.nl>
--
Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---