Module: Cockpit::ViewHelper

Defined in:
lib/cockpit/core/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#c(key) ⇒ Object



4
5
6
# File 'lib/cockpit/core/view_helper.rb', line 4

def c(key)
  Cockpit::Settings.global[key]
end

#setting_attribute(key, attribute, scope = nil) ⇒ Object



13
14
15
# File 'lib/cockpit/core/view_helper.rb', line 13

def setting_attribute(key, attribute, scope = nil)
  Cockpit::Settings.for(scope.to_s.camelize).definition(key).attributes[attribute]
end

#setting_options(key, scope = nil) ⇒ Object



9
10
11
# File 'lib/cockpit/core/view_helper.rb', line 9

def setting_options(key, scope = nil)
  setting_attribute(key, :options, scope)
end