123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::DynamicMatchers::FindByBang

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Method
Instance Chain:
self, Finder, Method
Inherits: ActiveRecord::DynamicMatchers::Method
Defined in: activerecord/lib/active_record/dynamic_matchers.rb

Class Attribute Summary

Method - Inherited

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Finder - Included

#attributes_hash

Given that the parameters starts with _, the finder needs to use the same parameter name.

#body

Extended in activerecord-deprecated_finders.

#finder,
#result

Extended in activerecord-deprecated_finders.

#signature

The parameters in the signature may have reserved Ruby words, in order to prevent errors, we start each param name with _.

Method - Inherited

Constructor Details

This class inherits a constructor from ActiveRecord::DynamicMatchers::Method

Class Method Details

.prefix

[ GitHub ]

  
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 127

def self.prefix
  "find_by"
end

.suffix

[ GitHub ]

  
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 131

def self.suffix
  "!"
end

Instance Method Details

#finder

[ GitHub ]

  
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 135

def finder
  "find_by!"
end