Sha256: 2be7013d7a9c82c745801c8c105da247c54f362426d3d08226cc25d07484300e
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
# Intialize the gem by including some extension to ActiveRecord::Base require File.dirname(__FILE__) + '/has_setting/ar_extensions' require File.dirname(__FILE__) + '/has_setting/formatters' require File.dirname(__FILE__) + '/has_setting/setting' ActiveRecord::Base.class_eval do include(HasSetting::InstanceMethods) extend(HasSetting::ClassMethods) end HasSetting::Formatters.register_formatter(:string, HasSetting::Formatters::StringFormatter.new) HasSetting::Formatters.register_formatter(:strings, HasSetting::Formatters::StringsFormatter.new) HasSetting::Formatters.register_formatter(:float, HasSetting::Formatters::FloatFormatter.new) HasSetting::Formatters.register_formatter(:floats, HasSetting::Formatters::FloatsFormatter.new) HasSetting::Formatters.register_formatter(:int, HasSetting::Formatters::IntFormatter.new) HasSetting::Formatters.register_formatter(:ints, HasSetting::Formatters::IntsFormatter.new) HasSetting::Formatters.register_formatter(:boolean, HasSetting::Formatters::BooleanFormatter.new) HasSetting::Formatters.register_formatter(:booleans, HasSetting::Formatters::BooleansFormatter.new)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simplificator-has_setting-0.4.2 | lib/has_setting.rb |