Sha256: 24bbcf2b0ab6cf4c0f5e6bee3a28b5bc5e2a4092dc61108086fef2e092f3b153
Contents?: true
Size: 1.65 KB
Versions: 2
Compression:
Stored size: 1.65 KB
Contents
module ActiveRecord::Userstamp::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 # !@attribute [rw] deleter_attribute # Determines the name of the column in the database which stores the name of the deleter. # # Override the attribute by using the stampable class method within a model. # # By default, this is set to +:deleter_id+. mattr_accessor :deleter_attribute self.deleter_attribute = :deleter_id end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activerecord-userstamp-3.0.4 | lib/active_record/userstamp/configuration.rb |
activerecord-userstamp-3.0.3 | lib/active_record/userstamp/configuration.rb |