| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ / /
| | |
| | |
| | | |
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.
|
| | | |
| | | |
| | | |
| | | | |
We can just use method_defined? and private_method_defined?
|
|/ / /
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | | |
Make sure we don't redefine an already-defined attribute method.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
db:migrate:status not looking at all migration paths
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add first_or_create family of methods to Active Record
|
| | | |
| | | |
| | | |
| | | | |
of methods.
|
| | | |
| | | |
| | | |
| | | | |
removing examples that create several users at the same time (this is confusing and not really helpful).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Database adapters use a statement pool for limiting the number of open
prepared statments on the database. The limit defaults to 1000, but can
be adjusted in your database config by changing 'statement_limit'.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
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
|