module Sequel::Plugins::DefaultsSetter::ClassMethods

Attributes

default_values[R]

The default values to use for this model. A hash with column symbol keys and default values. If the default values respond to call, it will be called to get the value, otherwise the value will be used directly. You can manually modify this hash to set specific default values, by default the ones will be parsed from the database.

Public Instance Methods

cache_default_values?() click to toggle source

Whether default values should be cached in the values hash after being retrieved.

   # File lib/sequel/plugins/defaults_setter.rb
82 def cache_default_values?
83   @cache_default_values
84 end
freeze() click to toggle source

Freeze default values when freezing model class

Calls superclass method
   # File lib/sequel/plugins/defaults_setter.rb
87 def freeze
88   @default_values.freeze
89   super
90 end