Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make app title customization easier to customize.

  • Loading branch information...
commit d4568f272edcf2e1e6a4d3b967eb2e0760747fed 1 parent 1c99efc
Benoit Bénézech bbenezech authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/generators/rails_admin/templates/initializer.erb
8 lib/generators/rails_admin/templates/initializer.erb
View
@@ -11,8 +11,10 @@
RailsAdmin.config do |config|
- config.current_user_method { current_<%= @model_name %> } #auto-generated
-
+ config.current_user_method { current_<%= @model_name %> } # auto-generated
+
+ config.main_app_name { ['<%= Rails.application.engine_name.titleize.chomp(' Application') %>', 'Admin'] } # auto-generated
+
# ==> Authentication (before_filter)
# This is run inside the controller instance so you can setup any authentication you need to.
# By default, the authentication will run via warden if available.
@@ -35,7 +37,7 @@ RailsAdmin.config do |config|
# Use cancan https://github.com/ryanb/cancan for authorization:
# config.authorize_with :cancan
- # Or use a custom dead-stupid authorization rule:
+ # Or use simple custom authorization rule:
# config.authorize_with do
# redirect_to root_path unless warden.user.is_admin?
# end
Please sign in to comment.
Something went wrong with that request. Please try again.