On Sun, Jun 15, 2014 at 6:40 PM, Damián M. González <[email protected]> wrote:
> I have 2 actions by a controller. There's an active layout for > both(application.html.erb). There's two HTML elements defined in the > layout which I want to be collored diferently if one action is called or > the another. Why not just define CSS classes for the two styles in a common style sheet and set an instance variable in the controller to pass to the view? e.g. <div class="<%= @actionclass %>"> ... </div> I can imagine other approaches, but that seems simplest. FWIW, -- Hassan Schroeder ------------------------ [email protected] http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yD5x_UaDZdEUWNwuYLBJuEkr9hR4XhJHA_be2tNybb6wA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

