0

I have a form with radio buttons on a page. I also have a helper method called vanish that adds
raw' style="display: none;" '.

In my view I would like to be able to call a boolean value based on which radio button is selected to activate/deactivate the helper method. The goal would look something like this

<p <%= vanish unless x %> > Stuff that only shows when a certain radio button is selected </p>

I am trying to do this without JavaScript. I am using Ruby on Rails 3.2.13

If you need anything else let me know.

Edit. I have seen this done in rails 2.3 where x would be params[:name] != 'value. This however does not dynamically change the page in rails 3.2

4

1 に答える 1