lib/cm_admin/models/tab.rb in cm-admin-0.7.2 vs lib/cm_admin/models/tab.rb in cm-admin-0.7.3

- old
+ new

@@ -1,13 +1,14 @@ module CmAdmin module Models class Tab - attr_accessor :nav_item_name, :custom_action + attr_accessor :nav_item_name, :custom_action, :display_if - def initialize(nav_item_name, custom_action) + def initialize(nav_item_name, custom_action, display_if) @nav_item_name = nav_item_name @custom_action = custom_action + @display_if = display_if || lambda { |arg| return true } end end end end \ No newline at end of file