Permalink
Browse files

make app title customization easier to customize.

  • Loading branch information...
1 parent 1c99efc commit d4568f272edcf2e1e6a4d3b967eb2e0760747fed @bbenezech bbenezech committed Sep 20, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/generators/rails_admin/templates/initializer.erb
@@ -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
@gunn

gunn Sep 20, 2011

Collaborator

nice

+
# ==> 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

1 comment on commit d4568f2

Collaborator

jphpsf commented on d4568f2 Sep 21, 2011

This is cool.

What do you think of this? https://github.com/sferik/rails_admin/pull/560/files

That's the same thing for footer

Please sign in to comment.