mh
2010-May-12 00:11 UTC
Rails 3: perform controller action upon selecting menu item (UJS?)
In Rails 3, I have a form that has a menu on it. I would like to render an area containing text fields within the form differently depending on what''s selected in the menu. Prior to Rails 3, one way it appears I could do this is by using observe_field on the menu and call an action in my controller that renders the appropriate partial which could then be swapped into a div in my form. In Rails 3, I''m not getting any further with this approach than the following error when I try to display the view the first time: undefined method `observe_field'' Am I on the right track, or is there a new and improved, UJS-correct way of doing this in Rails 3? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Greg Moreno
2010-Aug-13 01:47 UTC
Re: Rails 3: perform controller action upon selecting menu item (UJS?)
Try this http://railsforum.com/viewtopic.php?id=37984 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.