Sha256: 23b51e3d1b1df7de2a3ed4cfc71d1e243babd87c046eaefb14f096cd61700c24

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

active_admin_sidebar
====================

easy change sidebar position with activeadmin


1) change sidebar position dynamically with before_filter

  # app/admin/posts.rb
  ActiveAdmin.register Post do
    before_filter :left_sidebar!, :only=>[:show]
  end

  # app/admin/comments.rb
  ActiveAdmin.register Comment do
    before_filter :right_sidebar!
  end



2) move sidebar to left within all resource (config/initializers/active_admin.rb)


  # == Controller Filters
  #
  # You can add before, after and around filters to all of your
  # Active Admin resources from here.
  #
  config.before_filter :left_sidebar!



Add including of css file 

  @import "active_admin_sidebar"; 

to the  app/assets/stylesheets/active_admin.css.scss

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_admin_sidebar-0.0.2 README.rdoc