Skip to content

Commit 515a548

Browse files
committed
Use StringSymbolOrProcSetting for footer.
1 parent b95c2b1 commit 515a548

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

lib/active_admin/namespace_settings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class NamespaceSettings < DynamicSettingsNode
1818
register :site_title_image, "", :string_symbol_or_proc
1919

2020
# Set the site footer text (defaults to Powered by ActiveAdmin text with version)
21-
register :footer, ""
21+
register :footer, "", :string_symbol_or_proc
2222

2323
# Set a favicon
2424
register :favicon, false

lib/active_admin/views/footer.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,17 @@ def build(namespace)
66
super id: "footer"
77
@namespace = namespace
88

9-
if footer?
9+
if footer_text.present?
1010
para footer_text
1111
else
1212
para powered_by_message
1313
end
1414
end
1515

16-
def footer?
17-
@namespace.footer.present?
18-
end
19-
2016
private
2117

2218
def footer_text
23-
helpers.render_or_call_method_or_proc_on(self, @namespace.footer)
19+
@footer_text ||= @namespace.footer(self)
2420
end
2521

2622
def powered_by_message

0 commit comments

Comments
 (0)