- 03 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency.
-
- 31 8月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This was almost every case where we are overriding `respond_to?` in a way that mirrors a parallel implementation of `method_missing`. There is one remaining case in Active Model that should probably do the same thing, but had a sufficiently strange implementation that I want to investigate it separately. Fixes #26333.
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 25 7月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
-
- 24 7月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
Where appropriatei, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
-
- 09 9月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit d5ba9a42, reversing changes made to 30c50339. Reason: This generate the dynalic finders more than one time
-
- 09 5月, 2015 1 次提交
-
-
由 Rob Looby 提交于
-
- 02 1月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 30 1月, 2014 1 次提交
-
-
由 Godfrey Chan 提交于
Before: >> ActiveRecord::Base.respond_to?(:find_by_something) NoMethodError: undefined method `abstract_class?' for Object:Class After: >> ActiveRecord::Base.respond_to?(:find_by_something) => false
-
- 11 12月, 2013 1 次提交
-
-
由 Lauro Caetano 提交于
The dynamic finder was creating the method signature with the parameters name, which may have reserved words and this way creating invalid Ruby code. Closes: #13261 Example: # Before Dog.find_by_alias('dog name') # Was creating this method def self.find_by_alias(alias, options = {}) # After Dog.find_by_alias('dog name') # Will create this method def self.find_by_alias(_alias, options = {})
-
- 22 8月, 2013 1 次提交
-
-
由 John Hawthorn 提交于
Caches the patterns of ActiveRecord::DynamicMatchers in a class instance variable.
-
- 26 2月, 2013 2 次提交
-
-
由 Xavier Noria 提交于
It turns out this file is required in active_record.rb.
-
由 Xavier Noria 提交于
-
- 17 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
For consistency with the other AR extension plugins we are creating.
-
- 28 7月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 14fc8b34. Reason: we need to discuss a better path from this removal. Conflicts: activerecord/lib/active_record/reflection.rb activerecord/test/cases/base_test.rb activerecord/test/models/developer.rb
-
- 22 6月, 2012 1 次提交
-
-
由 Maximilian Schneider 提交于
previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute
-
- 19 6月, 2012 1 次提交
-
-
由 Steve Klabnik 提交于
This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807
-
- 04 5月, 2012 6 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 03 3月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
* Avoid double hash lookups in AR::Reflection when reflecting associations/aggregations * Minor cleanups: use elsif, do..end, if..else instead of unless..else * Simplify DynamicMatchers#respond_to? * Use "where" instead of scoped with conditions hash * Extract `scoped_by` method pattern regexp to constant * Extract noisy class_eval from method_missing in dynamic matchers * Extract readonly check, avoid calling column#to_s twice in persistence * Refactor predicate builder, remove some variables
-
- 28 1月, 2012 1 次提交
-
-
由 Paul McMahon 提交于
-
- 27 1月, 2012 1 次提交
-
-
由 Paul McMahon 提交于
Under Rails 3.1, you were allowed to pass a hash to a find_or_create method with multiple attribute names, but this was broken as the arguments were being improperly validated.
-
- 16 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-