Class: ActiveRecord::DynamicMatchers::FindLastBy

Inherits:
Method
  • Object
show all
Includes:
DeprecatedFinder, DeprecationWarning, Finder
Defined in:
lib/active_record/deprecated_finders/dynamic_matchers.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DeprecationWarning

#body, #deprecation_warning

Methods included from DeprecatedFinder

#body, #signature

Class Method Details

.prefixObject



90
91
92
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 90

def self.prefix
  "find_last_by"
end

Instance Method Details

#deprecation_alternativeObject



102
103
104
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 102

def deprecation_alternative
  "Post.where(...).last"
end

#finderObject



94
95
96
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 94

def finder
  "where"
end

#resultObject



98
99
100
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 98

def result
  "#{super}.last"
end