rails helper css class change -


i have helper function in class shown when specific controller open.

helper:

     def cssclass      'class="tab_gen_active3"' if controller_name == "user_brands"       end 

i having difficulty apply 'else' in "tab_gen3" css class activated when controller_name = "user_categories". idea how this.

change to

controller_name == "user_brands" ? 'class="tab_gen_active3"' : '' 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -