| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \
| | | | | |
| | | | | | |
Rename testcase name. It's wrong in the context.
|
| |/ / / / |
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
In a similar vein to Pat's work on create, drop etc, the db:charset
task is now a one liner in databases.rake
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This happens when A has_many many B and A accepts_nested_attributes B that has a numeric colum
with initial 0 value. So a.update_attributes({:b_attributes => { :id => b.id, :numeric => 'foo' }})
passes the validation test but, the value of :numeric doesn't change.
his commit forces that the update fails with the above conditions.
Fixes #6393
Fixes #2331
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows you to retrieve the list of attributes you've defined.
Usable for e.g. selects in the view, or interators based on the
attributes you wish to store in the serialized column.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Removing composed_of
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
to avoid ORA-02289: sequence does not exist
for `SELECT "BLACK_JOKES_SEQ".NEXTVAL FROM dual`
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Closes #6697
|
| | | | |
| | | | |
| | | | |
| | | | | |
Based on examples seen in the Rails test suite. [ci skip]
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Get logic out of db rake tasks, and into classes and objects
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Minimal implementation that supports db:create SQLite replacement
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Avoid unnecessary catching of Exception instead of StandardError.
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
Without this, some tasks won't load configurations
like custom engines.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
config.active_record.mass_assignment_sanitizer=
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Get rid of ActiveModel::Configuration, make better use of
ActiveSupport::Concern + class_attribute, etc.
|
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Add uuid datatype support to PostgreSQL adapter
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
Remove update_attribute.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
That change to update_attribute was considered
to be too subtle and was reverted in 30ea923
just before Rails 3 shipped. Later we introduced
update_column (Rails 3.1).
|