- 19 6月, 2012 2 次提交
-
-
由 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
-
由 kennyj 提交于
-
- 18 6月, 2012 7 次提交
-
-
由 David Paschich 提交于
Based on examples seen in the Rails test suite. [ci skip]
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Pat Allan 提交于
-
由 Pat Allan 提交于
-
由 Pat Allan 提交于
Now isn't that better? And yes, I know that private has no impact on class methods - it's a visual distinction, not a technical one.
-
- 17 6月, 2012 8 次提交
-
-
由 Pat Allan 提交于
-
由 Pat Allan 提交于
-
由 Pat Allan 提交于
-
由 Pat Allan 提交于
-
由 Dylan Smith 提交于
-
由 Cairo Noleto 提交于
Without this, some tasks won't load configurations like custom engines.
-
由 Pat Allan 提交于
Minimal implementation that supports db:create SQLite replacement
-
由 kennyj 提交于
-
- 16 6月, 2012 6 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
由 Jon Leighton 提交于
-
- 15 6月, 2012 4 次提交
-
-
由 Rafael Mendonça França 提交于
Before 7f4b0a1231bf3c65db2ad4066da78c3da5ffb01, this test are asserting that update_attribute does the dirty tracking. Since we remove this method and update_column write in the database directly this tests will always fail>
-
由 Rafael Mendonça França 提交于
-
由 Xavier Noria 提交于
-
由 Steve Klabnik 提交于
Historically, update_attribute and update_attributes are similar, but with one big difference: update_attribute does not run validations. These two methods are really easy to confuse given their similar names. Therefore, update_attribute is being removed in favor of update_column. See the thread on rails-core here: https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/BWPUTK7WvYA
-
- 14 6月, 2012 2 次提交
-
-
由 Konstantin Shabanov 提交于
-
由 Xavier Noria 提交于
That change to update_attribute was considered to be too subtle and was reverted in 30ea9230 just before Rails 3 shipped. Later we introduced update_column (Rails 3.1).
-
- 13 6月, 2012 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 12 6月, 2012 5 次提交
-
-
由 kennyj 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 11 6月, 2012 5 次提交
-
-
由 chrismcc 提交于
-
由 Yasuo Honda 提交于
-
由 Ben Woosley 提交于
reflection. ActiveRecord::FinderMethods#construct_limited_ids_condition will raise ThrowResult if the limited reflection comes back empty. The other callers of #construct_limited_ids_condition handle this exception (more specifically, the callers of construct_relation_for*), but #exists? didn't until now.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
This behavior was added in be4ecdcc. Closes #1139. Fixes #2553, #1141, #1623 and #2062.
-