Re:Offer HN: Help with Ruby on Rails
by erikpukinskis on Wednesday October 27, 2010 @09:23PM
(#1841254)
In your view you can just do this:
That's HAML... let me know if you want to see the ERB. If you want to abstract even further you can do:
Then in your controller you can just do:
That variable will either be "jazz" or "classical" depending on which button was clicked. If you want to have different behaviors you can use a case statement:
[ Parent
| on HN ]
There are no comments on this comment yet.