Simplify code.
This commit is contained in:
parent
7ed698ed0e
commit
5048a6067a
|
@ -50,9 +50,9 @@ module PaperTrail
|
||||||
:as => :item,
|
:as => :item,
|
||||||
:order => "created_at ASC, #{self.primary_key} ASC"
|
:order => "created_at ASC, #{self.primary_key} ASC"
|
||||||
|
|
||||||
after_create :record_create if !options[:on] || (options[:on] && options[:on].include?(:create))
|
after_create :record_create if !options[:on] || options[:on].include?(:create)
|
||||||
before_update :record_update if !options[:on] || (options[:on] && options[:on].include?(:update))
|
before_update :record_update if !options[:on] || options[:on].include?(:update)
|
||||||
after_destroy :record_destroy if !options[:on] || (options[:on] && options[:on].include?(:destroy))
|
after_destroy :record_destroy if !options[:on] || options[:on].include?(:destroy)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Switches PaperTrail off for this class.
|
# Switches PaperTrail off for this class.
|
||||||
|
|
Loading…
Reference in New Issue