Notes posted by Graffzon
RSS feed
0 thanks
Example of conditions using
f.e.
validates :number, :presence => { :if => :quota_file? } def self.quota_file? quota_file? end

0 thanks

0 thanks
logic in class/id
If you need to place some simple logic in class or like that, I think that best to make it with simple brackets:
Code example
<%= link_to ‘All actions’, switch_action_tab_path, :remote => true, :class => (‘selected’ if @tab == ‘all’) %>