Module: RevisionSan::ClassMethods

Defined in:
lib/revision_san.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(klass) ⇒ Object



20
21
22
23
24
25
# File 'lib/revision_san.rb', line 20

def self.extended(klass)
  class << klass
    alias_method_chain :find, :current_revisions
    alias_method_chain :count, :current_revisions
  end
end

Instance Method Details

#count_with_current_revisions(*args) ⇒ Object



16
17
18
# File 'lib/revision_san.rb', line 16

def count_with_current_revisions(*args)
  current_revisions.count_without_current_revisions(*args)
end

#find_with_current_revisions(*args) ⇒ Object



12
13
14
# File 'lib/revision_san.rb', line 12

def find_with_current_revisions(*args)
  current_revisions.find_without_current_revisions(*args)
end