Skip to content

Commit df47820

Browse files
committed
Always set the site title in the initializer. Default to friendly app name.
[activeadmin#23 state:resolved]
1 parent 8cbc136 commit df47820

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/active_admin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module ActiveAdmin
4646
mattr_accessor :namespaces
4747

4848
# The title which get's displayed in the main layout
49-
@@site_title = Rails.application.class.name.split("::").first.titlecase
49+
@@site_title = ""
5050
mattr_accessor :site_title
5151

5252
# Load paths for admin configurations. Add folders to this load path

lib/generators/active_admin/install/templates/active_admin.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
# Set the title that is displayed on the main layout
66
# for each of the active admin pages.
77
#
8-
# If you don't set it here, it defaults to a friendly
9-
# name of your Rails.application class name.
10-
#
11-
# config.site_title = "My Great Site"
8+
config.site_title = "<%= Rails.application.class.name.split("::").first.titlecase %>"
129

1310

1411
# == Default Namespace

0 commit comments

Comments
 (0)