Class: ActiveRecord::DynamicMatchers::ScopedBy

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DeprecationWarning

#deprecation_warning

Class Method Details

.prefixObject



112
113
114
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 112

def self.prefix
  "scoped_by"
end

Instance Method Details

#bodyObject



116
117
118
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 116

def body
  "#{deprecation_warning} \n where(#{attributes_hash})"
end

#deprecation_alternativeObject



120
121
122
# File 'lib/active_record/deprecated_finders/dynamic_matchers.rb', line 120

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