Module: ActiveRecord::DynamicMatchers::DeprecatedFinder

Included in:
FindAllBy, FindBy, FindByBang, FindLastBy
Defined in:
lib/active_record/deprecated_finders/dynamic_matchers.rb

Instance Method Summary collapse

Instance Method Details

#bodyObject



6
7
8
9
10
11
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 6

def body
  <<-CODE
    result = #{super}
    result && block_given? ? yield(result) : result
  CODE
end

#resultObject



13
14
15
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 13

def result
  "all.apply_finder_options(options, true).#{super}"
end

#signatureObject



17
18
19
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 17

def signature
  "#{super}, options = {}"
end