Sha256: 111ce8e7f4daf0a42dc14879f5e62a9198e781a84b897ac4aecafbe7e1aa69f8
Contents?: true
Size: 405 Bytes
Versions: 27
Compression:
Stored size: 405 Bytes
Contents
class Setting < ActiveRecord::Base has_paper_trail acts_as_indexed :fields => [:name, :value, :note] include Soapbox::Setting if File.exists? "app/models/soapbox/setting.rb" def self.[](name) find_or_create_by_name(name).try(:value) end def self.[]=(name, v) setting = find_or_create_by_name(name) setting.value = (v ? v : "") setting.save setting.value end end
Version data entries
27 entries across 27 versions & 1 rubygems