-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |