| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Backport c517602 to fix #6115
Deleted:
activerecord/lib/active_record/core.rb
Conflicts:
activerecord/test/cases/base_test.rb
|
|
|
|
|
|
|
|
|
|
| |
Fix #8575
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods/serialization.rb
activerecord/test/cases/serialized_attribute_test.rb
activerecord/test/models/person.rb
|
| |
|
|
|
|
|
|
| |
Ruby 1.8 does not support this format in Time, so the format will only
be added to the available date formats on Ruby 1.9. Changelog entry was
changed to explain that as well.
|
|
|
|
|
|
| |
It fails with Identity Map because the find call returns the same
object, so the "content" attribute that we expect to raise "missing
attribute" is actually present.
|
| |
|
|
|
|
|
| |
Backport test to ensure there won't be regressions.
The issue only happens on master at the moment.
|
|
|
|
|
|
| |
This can be done using the class attribute cache_timestamp_format
Closes #8195
|
| |
|
|
|
|
|
|
| |
Increase numeric-timestamp precision to nanoseconds
Conflicts:
activesupport/lib/active_support/core_ext/time/conversions.rb
|
|
|
|
| |
Public method attributes_before_type_cast used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like read_attribute_before_type_cast and returns unserialised values.
|
|
|
|
|
|
| |
Fix for time type columns with invalid time value
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
| |
Fix occasional microsecond conversion inaccuracy
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Deprecate update_attribute."
This reverts commit b081f6b59fb3f15d12043072ad9b331ffd2bc56e.
Reason: Since the new deprecation policy we removed the deprecation of
update_attribute but we didn't reverted the changes to use
update_column.
Fixes #7306
|
|
|
|
|
|
| |
Integration's definition of #to_param must override
Conversion's. Otherwise, there is a regression from
3.1 in the behavior of a non-persisted AR::Base instance
which nevertheless has an id.
|
|
|
|
|
|
|
|
|
|
|
| |
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 deprecated in favor of
update_column, and will be removed in Rails 4.
See the discussion on rails-core here:
https://groups.google.com/d/topic/rubyonrails-core/BWPUTK7WvYA/discussion
|
|
|
|
|
|
| |
Fix #5797. Error calling dup method on AR model with serialized field
Conflicts:
activerecord/lib/active_record/core.rb
|
| |
|
|
|
|
|
|
|
|
| |
Cherry-picked from e96d04a2e4e244ea5053cb4e8ab97db604d0c796.
Conflicts:
activerecord/lib/active_record/attribute_methods/read.rb
|
|
|
|
|
|
| |
Conflicts:
activerecord/lib/active_record/core.rb
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When subclassing abstract_class table_name should be always computed
based on class name, no matter if superclass is subclassing base
or another abstract_class. So:
class FirstAbstract < ActiveRecord::Base
self.abstract_class = true
end
class SecondAbstract < FirstAbstract
self.abstract_class = true
end
class Post < SecondAbstract
self.table_name #=> 'posts' (not 'second_abstracts')
end
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Allows two models to use the same table but have different primary keys.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This means we never have to rely on define_method (which is slower and
uses more memory), even when we have attributes containing characters
that are not allowed in standard method names.
(I am mainly changing this because the duplication annoys me, though.)
|
|
|
|
|
| |
This only existed to support methods like `set_table_name` in Active
Record, which are themselves being deprecated.
|
| |
|
|
|
|
| |
using self.foo=
|
| |
|
| |
|
| |
|
|
|
|
| |
method.
|
|\
| |
| | |
association methods are now generated in modules
|
| | |
|
|/
|
|
| |
This commit contains a simple failing test that demonstrates the behaviour we expect, and a fix. When using `becomes` to transform the type of an object, it should retain any error information that was present on the original instance.
|
| |
|
|
|
|
| |
This reverts commit ee2be435b1e5c0e94a4ee93a1a310e0471a77d07.
|
|
|
|
|
| |
If we don't have a primary key when we ask for it, it's better to fail
fast. Fixes GH #2307.
|
|
|
|
|
| |
For consistency with find_or_initialize_by. Also remove first_or_build
alias.
|
| |
|
|\
| |
| | |
Add first_or_create family of methods to Active Record
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Active Record.
This let's you write things like:
User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson", :hot => true)
Related to #2420.
|
| |
| |
| |
| | |
have been failing intermittently for a long while due to what appears to be a Ruby bug. If anyone has the skills/expertise/time to debug this, please speak to the Travis guys.
|
|/
|
| |
As in previous commit it's removed.
|
|
|
|
| |
Fix test column names are escaped for oracle
|