| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| | |
case sensitive collation.
|
| | |
|
|\ \
| | |
| | | |
Use the schema_search_path in prepared statements.
|
| | |
| | |
| | |
| | |
| | | |
Add tests for prepared statements with multiple schemas in
postgreSQL.
|
| | |
| | |
| | |
| | | |
You can use multiple databases in your tests without disabling transactional fixtures.
|
| | |
| | |
| | |
| | |
| | | |
An association between two models cannot be made if a relevant key is
unknown, so fail fast rather than generating invalid SQL. Fixes #3207.
|
|/ /
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes #2807.
|
| |
| |
| |
| | |
Fix: habtm doesn't respect select query method
|
| |
| |
| |
| | |
Closes #3104.
|
| |
| |
| |
| | |
mutating the array. Fixes #3020.
|
| |
| |
| |
| |
| | |
This Sqlite3 should be in if block.
Was giving error because sqlite3 is not loaded
|
| |
| |
| | |
for Sqlite3 in AR-JDBC.It's Jdbc::SQLite3::VERSION
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no meaningful performance penalty in defining attribute
methods, since it only happens once.
There is also no reason *not* to define them, since they get thrown in
an included module, so they will not 'overwrite' anything. In fact, this
is desirable, since it allows us to call super.
|
| |
| |
| |
| |
| | |
For consistency with find_or_initialize_by. Also remove first_or_build
alias.
|
| |
| |
| |
| |
| |
| | |
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
|
| |/ / / /
|/| | | | |
|
| | | | | |
|
| | | | | |
|