lib/rails_admin/config/actions.rb in obitum-rails_admin-0.0.2 vs lib/rails_admin/config/actions.rb in obitum-rails_admin-0.0.3

- old
+ new

@@ -26,10 +26,10 @@ bindings[:controller] ? actions.select(&:visible?) : actions end def find custom_key, bindings = {} init_actions! - action = @@actions.find{ |a| a.custom_key == custom_key }.with(bindings) + action = @@actions.find{ |a| a.custom_key == custom_key }.try(:with, bindings) bindings[:controller] ? (action.try(:visible?) && action || nil) : action end def collection key, parent_class = :base, &block add_action key, parent_class, :collection, &block