Sha256: c0a3ab177991e7f8152b46e09aad32c39ae7c0c895a76c8d40e13210002a3d56
Contents?: true
Size: 1.3 KB
Versions: 3
Compression:
Stored size: 1.3 KB
Contents
module Userstamper::Configuration # !@attribute [r] default_stamper # Determines the default model used to stamp other models. # # By default, this is set to +'User'+. def self.default_stamper ActiveRecord::Base.stamper_class_name end # !@attribute [rw] default_stamper # @see {.default_stamper} def self.default_stamper=(stamper) ActiveRecord::Base.stamper_class_name = stamper end self.default_stamper = 'User'.freeze # @!attribute [r] default_stamper_class # Determines the default model used to stamp other models. def self.default_stamper_class ActiveRecord::Base.stamper_class end # !@attribute [rw] creator_attribute # Determines the name of the column in the database which stores the name of the creator. # # Override the attribute by using the stampable class method within a model. # # By default, this is set to +:creator_id+. mattr_accessor :creator_attribute self.creator_attribute = :creator_id # !@attribute [rw] updater_attribute # Determines the name of the column in the database which stores the name of the updater. # # Override the attribute by using the stampable class method within a model. # # By default, this is set to +:updater_id+. mattr_accessor :updater_attribute self.updater_attribute = :updater_id end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
userstamper-4.1.0 | lib/userstamper/configuration.rb |
userstamper-4.0.1 | lib/userstamper/configuration.rb |
userstamper-4.0.0 | lib/userstamper/configuration.rb |