Module: ActiveadminSettings::Helpers

Defined in:
lib/activeadmin-settings/helper.rb

Class Method Summary collapse

Class Method Details



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/activeadmin-settings/helper.rb', line 7

def settings_link_value(name, html_options={})
  val = Setting[name]

  if not val.empty? # add regular expression check here
    title, url = val.split(')')
    title.gsub!('(', '').strip!
    url.strip!

    link_to(title, url, html_options)
  end
end

.settings_value(name) ⇒ Object



3
4
5
# File 'lib/activeadmin-settings/helper.rb', line 3

def settings_value(name)
  Setting[name]
end