README.rdoc in active_admin_sidebar-0.0.5 vs README.rdoc in active_admin_sidebar-0.1.0.pre
- old
+ new
@@ -1,23 +1,23 @@
active_admin_sidebar
====================
-easy change sidebar position with activeadmin (tested with active_admin-0.5.0)
+easy change sidebar position with activeadmin (tested with activeadmin ~> 1.0.0.pre)
Add including of css file
- @import "active_admin_sidebar/index";
+ @import "active_admin_sidebar";
to the app/assets/stylesheets/active_admin.css.scss
Changing sidebar position dynamically with before_filter
# app/admin/posts.rb
ActiveAdmin.register Post do
- before_filter :left_sidebar!, :only=>[:show]
+ before_filter :left_sidebar!, only: [:show]
end
# app/admin/comments.rb
ActiveAdmin.register Comment do
before_filter :right_sidebar!
@@ -32,10 +32,10 @@
#
# You can add before, after and around filters to all of your
# Active Admin resources from here.
#
config.before_filter do
- left_sidebar! if respond_to?(:left_sidebar!)
+ left_sidebar!
end
Disabling using sidebar layout on dashboards (if you setup sidebar position with initializer)
ActiveAdmin.register_page "Dashboard" do