Sha256: ca0ef8af1d34b20e5f6fc456511874cb1dd2a997eb1ed9d4e42ee0f9149ecb9a
Contents?: true
Size: 663 Bytes
Versions: 58
Compression:
Stored size: 663 Bytes
Contents
module SettingsHelper # eg. # setting("blog/per_page", 20, :kind => :integer) def setting(namespaced_key, *args) namespace_separator = "/" opts = args.extract_options! value = args.first namespaced_key = namespaced_key.to_s group, key = namespaced_key.include?(namespace_separator) ? namespaced_key.split(namespace_separator) : [nil, namespaced_key] s = Setting.global("#{key}", :autocreate => false, :default => value, :group => group, :options => opts[:options], :locale => ((Fullstack::Cms.localized == false || opts[:locale] == false) ? nil : I18n.locale.to_s)) end alias :get_setting :setting end
Version data entries
58 entries across 58 versions & 1 rubygems