module Tienda
Constants
- VERSION
Public Class Methods
add_settings_group(group, fields = [])
click to toggle source
Defines a new set of settings which should be configrable from the settings page in the Tienda
UI.
# File lib/tienda.rb, line 40 def add_settings_group(group, fields = []) settings_groups[group] ||= [] settings_groups[group] = settings_groups[group] | fields end
reset_settings()
click to toggle source
Clears the settings from the thread cache so they will be taken from the database on next access
@return [NilClass]
# File lib/tienda.rb, line 34 def reset_settings Thread.current[:tienda_settings] = nil end
root()
click to toggle source
The path to the root of the Tienda
application
@return [String]
# File lib/tienda.rb, line 19 def root File.expand_path('../../', __FILE__) end
settings()
click to toggle source
Tienda
settings as configured in the database
@return [Tienda::Settings]
# File lib/tienda.rb, line 26 def settings Thread.current[:tienda_settings] ||= Tienda::Settings.new(Tienda::Setting.to_hash) end
settings_groups()
click to toggle source
All settings groups which are available for configuration on the settings page.
@return [Hash]
# File lib/tienda.rb, line 48 def settings_groups @settings_groups ||= {} end