module Adminterface::Extensions::Resource::ActionItem
Public Instance Methods
display_on?(action, render_context = self)
click to toggle source
Calls superclass method
# File lib/adminterface/extensions/resource/action_items.rb, line 81 def display_on?(action, render_context = self) @options[:only] = Array(return_or_proc_exec(@options[:only])) if @options[:only] @options[:except] = Array(return_or_proc_exec(@options[:except])) if @options[:except] super end
group()
click to toggle source
# File lib/adminterface/extensions/resource/action_items.rb, line 87 def group @options[:group] || 99 end
priority()
click to toggle source
# File lib/adminterface/extensions/resource/action_items.rb, line 91 def priority @options[:priority] || 99 end
Private Instance Methods
normalize_display_options!()
click to toggle source
# File lib/adminterface/extensions/resource/action_items.rb, line 101 def normalize_display_options! @options[:only] = @options[:only] if @options[:only] @options[:except] = @options[:except] if @options[:except] end
return_or_proc_exec(option)
click to toggle source
# File lib/adminterface/extensions/resource/action_items.rb, line 97 def return_or_proc_exec(option) option.is_a?(Proc) ? option.call : option end