aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb5
-rw-r--r--app/helpers/config_helper.rb5
2 files changed, 9 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9bdcb98cd..ec56566a9 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -14,6 +14,9 @@ module ApplicationHelper
# all of all.
include LinkToHelper
+ # Site-wide access to configuration settings
+ include ConfigHelper
+
# Copied from error_messages_for in active_record_helper.rb
def foi_error_messages_for(*params)
options = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {}
@@ -45,7 +48,7 @@ module ApplicationHelper
''
end
end
-
+
# Highlight words, also escapes HTML (other than spans that we add)
def highlight_words(t, words, html = true)
if html
diff --git a/app/helpers/config_helper.rb b/app/helpers/config_helper.rb
new file mode 100644
index 000000000..80f2deed2
--- /dev/null
+++ b/app/helpers/config_helper.rb
@@ -0,0 +1,5 @@
+module ConfigHelper
+ def site_name
+ MySociety::Config.get('SITE_NAME', 'Alaveteli')
+ end
+end \ No newline at end of file