Skip to content

Commit

Permalink
new rails_admin initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
jhass committed Feb 19, 2014
1 parent 376cd97 commit 0bca60f
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions config/initializers/rails_admin.rb
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
# RailsAdmin config file. Generated on June 08, 2013 20:52
# See github.com/sferik/rails_admin for more informations

RailsAdmin.config do |config|


################ Global configuration ################

# Set the admin name here (optional second array element will appear in red). For example:
config.main_app_name = ['Diaspora Project Site', 'Admin']
# or for a more dynamic name:
# config.main_app_name = Proc.new { |controller| [Rails.application.engine_name.titleize, controller.params['action'].titleize] }

# RailsAdmin may need a way to know who the current user is]
config.current_user_method { current_user } # auto-generated

# If you want to track changes on your models:
# config.audit_with :history, 'User'

# Or with a PaperTrail: (you need to install it first)
# config.audit_with :paper_trail, 'User'

# Display empty fields in index views:
# config.compact_show_view = false

# Number of default rows per-page:
# config.default_items_per_page = 20

# Exclude specific models (keep the others):
# config.excluded_models = ['Page', 'User']

# Include specific models (exclude the others):
config.included_models = ['User', 'Blogpost']

# Label methods for model instances:
config.label_methods = [:name, :title, :email]
### Popular gems integration

## == Devise ==
config.authenticate_with do
warden.authenticate! scope: :user
end
config.current_user_method(&:current_user)

## == Cancan ==
# config.authorize_with :cancan

## == PaperTrail ==
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0

### More at https://github.com/sferik/rails_admin/wiki/Base-configuration

config.actions do
dashboard # mandatory
index # mandatory
new
export
bulk_delete
show
edit
delete
show_in_app

## With an audit adapter, you can add:
# history_index
# history_show
end
end

0 comments on commit 0bca60f

Please sign in to comment.