I have a situation where when the user selects a state for a model by
choosing a particular menu item in the view, I want to either show or
hide a DIV containing other relevant attribute choices… pretty basic
stuff, but I’m still a newbie on a lot of the rails view/ui stuff.
I think I need a combination of observe_field on the attribute being
changed by the menu and then some kind of Prototype toggle effect. And
I also need to check the match the user’s menu choice against a
condition that says whether or not to show the secondary set of
choices in the DIV.
Can anyone show me what the code fragment would look like to do this?