Permalink
Browse files

Merge pull request #11 from jpmckinney/fix_sidebar_disable

Fix disabling of filters in latest active_admin
  • Loading branch information...
2 parents cc8a600 + 3bd9e9b commit 9494924b24f8bdb96f4d0d23ebf8d582fc86652f @elia elia committed Jul 5, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/active_admin/mongoid/resource.rb
@@ -6,14 +6,18 @@ class ActiveAdmin::Resource
def resource_table_name
resource.collection_name
end
-
- # Disable filters
- def add_default_sidebar_sections
- end
end
ActiveAdmin::ResourceController # autoload
class ActiveAdmin::ResourceController
+ before_filter :skip_sidebar!
+
+ protected
+
+ def skip_sidebar!
+ @skip_sidebar = true
+ end
+
# Use #desc and #asc for sorting.
def sort_order(chain)
params[:order] ||= active_admin_config.sort_order

0 comments on commit 9494924

Please sign in to comment.