Sha256: 514c5b1954302f18b2d32c388d1d58ab07222de4a1da138461714ba0cb75fa07
Contents?: true
Size: 613 Bytes
Versions: 14
Compression:
Stored size: 613 Bytes
Contents
module Mongoid module Userstamp class Config attr_writer :user_model attr_accessor :user_reader attr_accessor :creator_field attr_accessor :updater_field def initialize(&block) reset! instance_eval(&block) if block_given? end def reset! @user_model = :user @user_reader = :current_user @creator_field = :creator @updater_field = :updater end def user_model_name @user_model.to_s.classify end def user_model @user_model.to_s.classify.constantize end end end end
Version data entries
14 entries across 14 versions & 1 rubygems