lib/active_admin/helpers/optional_display.rb in activeadmin-0.4.4 vs lib/active_admin/helpers/optional_display.rb in activeadmin-0.5.0.pre

- old
+ new

@@ -19,10 +19,10 @@ return false if @options[:except] && @options[:except].include?(action.to_sym) if @options[:if] symbol_or_proc = @options[:if] return case symbol_or_proc when Symbol, String - self.send(symbol_or_proc) + render_context ? render_context.send(symbol_or_proc) : self.send(symbol_or_proc) when Proc render_context ? render_context.instance_exec(&symbol_or_proc) : instance_exec(&symbol_or_proc) else symbol_or_proc end end