| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This shouldn't ever happen unless people are doing something
particularly weird, but adding a deprecation in case there are bugs not
caught by our tests.
|
|
|
|
|
|
| |
Check respond_to_without_attributes? in method_missing. If there is any
method that responds (even private), let super handle it and raise
NoMethodError if necessary.
|
|
|
|
|
|
|
| |
We are subclassing Session here, but messing with the columns will
affect the attribute methods defined on the Session superclass, and
therefore other tests, unless we properly isolate it by resetting column
info before and after the test run.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a situation I encountered where a subclass would cache the
name of a generated attribute method in @_defined_class_methods. Then,
when the superclass has it's attribute methods undefined, the subclass
would always have to dispatch through method_missing, because the
presence of the attribute in @_defined_class_methods would mean that it
is never generated again, even if undefine_attribute_methods is called
on the subclass.
There various other confusing edge cases like this. STI classes share
columns, so let's just keep all the attribute method generation state
isolated to the base class.
|
|
|
|
|
|
|
|
|
| |
Previously we would just silently write the attribute. This can lead to
subtle bugs (for example, see the change in AutosaveAssociation where a
through association would wrongly gain an attribute.
Also, ensuring that we never gain any new attributes after
initialization will allow me to reduce our dependence on method_missing.
|
| |
|
| |
|
|\
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* https://github.com/rails/rails:
Postgresql adapter: added current_schema check for table_exists?
Postgresql adapter: added current_schema check for table_exists?
|
| | |
|
| |
| |
| |
| | |
association scope.
|
|\ \
| | |
| | | |
fix exists? to return false if passed nil (which may come from a missing
|
| | |
| | |
| | |
| | | |
param)
|
| | |
| | |
| | |
| | | |
Patch for issue #2820
|
| | |
| | |
| | |
| | | |
model should not be included in the association scope. (We're already excluding includes.) Fixes #2834.
|
| | |
| | |
| | |
| | | |
HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be.
|
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Last orders the records by id
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix bad options order in AR::Migration::CommandRecorder#invert_rename_index
|
| | | | |
| | | | |
| | | | |
| | | | | |
ActiveRecord::Migration::CommandRecorder#invert_rename_index
|
| |/ / /
|/| | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | | |
Fixes #2832
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 0df27c98d982ec87d2fb48cfda82694eb267993e.
Reverted due to failing test, see #2845.
|
| | | |
| | | |
| | | | |
As in previous commit it's removed.
|
| | | | |
|
| | | |
| | | |
| | | | |
Replace split on comma with a regexp that will reverse all ASC/DESC specifically
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
test_update_all_with_joins_and_offset_and_order
Last two asserts in this test assume that all_comments are ordered by posts.id and then by comments.id therefore additional ordering is added. Without it test was failing on Oracle which returned results in different order.
|
| | |
| | |
| | |
| | | |
Fix test column names are escaped for oracle
|
|\ \ \
| | | |
| | | | |
Make #extract_schema_and_table an instance method in Utils
|
| | | |
| | | |
| | | |
| | | | |
Also, move the utils test into its own test case.
|
| | | |
| | | |
| | | |
| | | | |
therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556.
|
| | | |
| | | |
| | | |
| | | | |
MysqlAdapter and Mysql2Adapter.
|
| | | | |
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
error. Strings tagged as binary will be stored in sqlite3 as blobs. It
is an error to insert binary data to a string column, so an error is
emitted in the log file. People are highly encouraged to track down the
source of the binary strings and make sure that the encoding is set
correctly before inserting to the database.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This reverts commit 87152f2604e73b218df90befda576f0acfed0bbf, reversing
changes made to 0d3615f04c79f6e90d8ab33fdfc920b8faac9cb8.
|
| | | |
|