Class: ActiveRecord::DynamicMatchers::FindByBang

Inherits:
Method show all
Defined in:
activerecord/lib/active_record/dynamic_matchers.rb

Instance Attribute Summary

Attributes inherited from Method

#attribute_names, #model, #name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

#define, #initialize, match, pattern, #valid?

Constructor Details

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

Class Method Details

.prefixObject



108
109
110
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 108

def self.prefix
  "find_by"
end

.suffixObject



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

def self.suffix
  "!"
end

Instance Method Details

#finderObject



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

def finder
  "find_by!"
end