lib/active_admin/helpers/optional_display.rb in activeadmin-2.7.0 vs lib/active_admin/helpers/optional_display.rb in activeadmin-2.8.0
- old
+ new
@@ -13,11 +13,11 @@
# call #normalize_display_options! after @options has been set
# to ensure that the display options are setup correctly
module OptionalDisplay
def display_on?(action, render_context = self)
- return false if @options[:only] && !@options[:only].include?(action.to_sym)
+ return false if @options[:only] && !@options[:only].include?(action.to_sym)
return false if @options[:except] && @options[:except].include?(action.to_sym)
case condition = @options[:if]
when Symbol, String
render_context.public_send condition
@@ -29,10 +29,10 @@
end
private
def normalize_display_options!
- @options[:only] = Array(@options[:only]) if @options[:only]
+ @options[:only] = Array(@options[:only]) if @options[:only]
@options[:except] = Array(@options[:except]) if @options[:except]
end
end
end