Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #4282 from edgecase/order_after_reorder | Aaron Patterson | 2012-01-04 | 2 | -1/+7 |
| | | | | correctly handle order calls after a reorder | ||||
* | Fix GH #4285. Remove options when we record calling creat_table | kennyj | 2012-01-04 | 1 | -0/+6 |
| | |||||
* | Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_ids | Aaron Patterson | 2011-12-28 | 1 | -0/+10 |
| | | | | allow reorder to affect eager loading correctly | ||||
* | avoid deprecation warnings when running AR tests | Aaron Patterson | 2011-12-24 | 2 | -2/+7 |
| | |||||
* | Fix #4046. | Jon Leighton | 2011-12-23 | 3 | -0/+22 |
| | |||||
* | serialize fails on subclass | Alvaro Bautista | 2011-12-23 | 4 | -6/+32 |
| | |||||
* | Make ActiveRecord::Relation#pluck work with serialized attributes | Jon Leighton | 2011-12-22 | 1 | -1/+8 |
| | |||||
* | added failing tests for has_many, has_one and belongs_to associations with ↵ | Jakub Kuźma | 2011-12-21 | 3 | -7/+65 |
| | | | | | | strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051 Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Merge pull request #4014 from lest/bypass-preloading-for-ids-reader | Jon Leighton | 2011-12-18 | 1 | -0/+6 |
|\ | | | | | bypass preloading for ids_reader | ||||
| * | bypass preloading for ids_reader | Sergey Nartimov | 2011-12-18 | 1 | -0/+6 |
| | | | | | | | | | | when fetching ids for a collection, bypass preloading to avoid the unnecessary performance overhead | ||||
* | | call scope within unscoped to prevent duplication of where values | Sergey Nartimov | 2011-12-17 | 2 | -0/+7 |
|/ | |||||
* | Delete obsolete comment | Jon Leighton | 2011-12-16 | 1 | -1/+0 |
| | |||||
* | Should clear the primary keys cache also | Jon Leighton | 2011-12-16 | 1 | -1/+5 |
| | |||||
* | Don't store defaults in the schema cache | Jon Leighton | 2011-12-16 | 2 | -1/+2 |
| | |||||
* | Cache columns at the model level. | Jon Leighton | 2011-12-16 | 4 | -21/+34 |
| | | | | Allows two models to use the same table but have different primary keys. | ||||
* | Let AttributeMethods do its own including etc | Jon Leighton | 2011-12-15 | 1 | -4/+2 |
| | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -13/+0 |
| | |||||
* | Fix #3987. | Jon Leighton | 2011-12-15 | 1 | -0/+10 |
| | |||||
* | Allow nested attributes in associations to update values in it's owner ↵ | Andrew Kaspick | 2011-12-14 | 2 | -1/+9 |
| | | | | object. Fixes a regression from 3.0.x | ||||
* | Remove that there copy/pasted code :bomb: | Jon Leighton | 2011-12-14 | 1 | -5/+0 |
| | |||||
* | Don't try to autosave nested assocs. Fixes #2961. | Jon Leighton | 2011-12-14 | 1 | -0/+14 |
| | |||||
* | Stop the build asploding on 1.8.7 | Jon Leighton | 2011-12-14 | 1 | -0/+4 |
| | |||||
* | Add return for 1.8.7 | Jon Leighton | 2011-12-14 | 1 | -1/+1 |
| | |||||
* | Unfluff the CI. | Jon Leighton | 2011-12-14 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | With transactional fixtures enabled, the session records would end up in @_current_transaction_records, and at the end of the transaction, methods would be called on them that would trigger method_missing and trigger attribute methods to be generated. However, at this point the sessions table would not exist, and the columns were not cached, so an exception would be raised because we can't find the columns to generate attribute methods for. Not sure exactly why this didn't crop up before but there have been changes to the schema cache code and perhaps that means that column data that was cached previously at that point is now uncached. | ||||
* | Revert naive O(1) table_exists? implementation. | Jon Leighton | 2011-12-13 | 1 | -0/+1 |
| | | | | | | | | | | It was a bad idea to rescue exceptions here. This can interfere with transaction rollbacks which seems to be the cause of current CI failure. Instead, each adapter should implement its own DB-specific O(1) implementation, and we fall back on the generic, slower, implementation otherwise. | ||||
* | Errno::ENOENT error makes more sense when a file cannot be found | Aaron Patterson | 2011-12-10 | 1 | -1/+1 |
| | |||||
* | Allow to filter migrations by passing a block | Piotr Sarnacki | 2011-12-09 | 1 | -0/+18 |
| | | | | | | | | | | Example: ActiveRecord::Migrator.migrate(path) do |migration| migration.name =~ /User/ end The above example will migrate only migrations with User in the name | ||||
* | Use `table_exists?` from the schema cache. | Aaron Patterson | 2011-12-09 | 2 | -3/+4 |
| | |||||
* | Compare migrations for copying only by name and scope | Piotr Sarnacki | 2011-12-09 | 1 | -26/+1 |
| | |||||
* | Add suffix for migrations copied from engines | Piotr Sarnacki | 2011-12-09 | 1 | -23/+23 |
| | |||||
* | String#to_a is not available in 1.9 | Piotr Sarnacki | 2011-12-09 | 1 | -1/+1 |
| | |||||
* | Run also migrations in subdirectories. | Piotr Sarnacki | 2011-12-09 | 4 | -0/+42 |
| | | | | | With this commit, ActiveRecord will also look for migrations in db/migrate subdirectories. | ||||
* | Ignore origin comment when checking for duplicates on Migration.copy | Piotr Sarnacki | 2011-12-09 | 2 | -3/+38 |
| | | | | | | | 49ebe51 fixed copying migrations, but existing migrations would still trigger warnings. The proper way to compare migrations is to ignore origin lines - if migration is identical it means that we can silently skip it, regardless where it comes from. | ||||
* | Fix copying migrations from engines | Piotr Sarnacki | 2011-12-09 | 1 | -0/+21 |
| | | | | | | | | | | There was a bug in ActiveRecord::Migration.copy method, which prevented adding special comment about the origin of migration. Because of that, the check if migration is identical or if it's not and should be skipped was always saying that migration is skipped, which was causing additional useless warnings about skipped migrations. | ||||
* | Fix #3890. (Calling proxy_association in scope chain.) | Jon Leighton | 2011-12-08 | 2 | -1/+11 |
| | |||||
* | Regexp.union seems to have different results in 1.8 | Aaron Patterson | 2011-12-08 | 1 | -3/+3 |
| | |||||
* | Fix broken test_exists_query_logging from the table_exists? change | Jon Leighton | 2011-12-08 | 1 | -0/+1 |
| | |||||
* | moving ignored regexp to the instance | Aaron Patterson | 2011-12-07 | 1 | -6/+8 |
| | |||||
* | speeding up ignored sql testing | Aaron Patterson | 2011-12-07 | 1 | -1/+4 |
| | |||||
* | avoid deprecated methods | Aaron Patterson | 2011-12-06 | 1 | -1/+1 |
| | |||||
* | add prefix and suffix to renamed tables, closes #1510 | Vasiliy Ermolovich | 2011-12-06 | 3 | -0/+51 |
| | |||||
* | Merge pull request #3854 from exviva/validates_associated_marked_for_destruction | José Valim | 2011-12-04 | 1 | -0/+10 |
|\ | | | | | Do not validate associated records marked for destruction | ||||
| * | Do not validate associated records marked for destruction | Olek Janiszewski | 2011-12-05 | 1 | -0/+10 |
| | | | | | | | | | | | | The main reason for this change is to fix a bug where `validates_associated` would prevent `accepts_nested_attributes_for` with `allow_destroy: true` from destroying invalid associated records. | ||||
* | | Merge pull request #3851 from ebeigarts/fix_sequence_name | Jon Leighton | 2011-12-04 | 1 | -0/+10 |
|\ \ | |/ |/| | Fix sequence name with abstract classes. | ||||
| * | Fix sequence name with abstract classes. | Edgars Beigarts | 2011-12-04 | 1 | -0/+10 |
| | | |||||
* | | implements a much faster auto EXPLAIN, closes #3843 [José Valim & Xavier Noria] | Xavier Noria | 2011-12-04 | 1 | -29/+31 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This commit vastly reduces the impact of auto explain logging when enabled, while keeping a negligible cost when disabled. The first implementation was based on the idea of subscribing to "sql.active_record" when needed, and unsubscribing once done. This is the idea behind AR::Relation#explain. Subscribe, collect, unsubscribe. But with the current implementation of notifications unsubscribing is costly, because it wipes an internal cache and that puts a penalty on the next event. So we are switching to an approach where a long-running subscriber is listening. Instead of collecting the queries with a closure in a dedicated subscriber, now we setup a thread local. If the feature is disabled by setting the threshold to nil, the subscriber will call a method that does nothing. That's totally cheap. | ||||
* | Add missing require | Jon Leighton | 2011-12-03 | 1 | -0/+2 |
| | |||||
* | Avoid postgres 9.X syntax | Jon Leighton | 2011-12-03 | 1 | -1/+5 |
| | |||||
* | Fix #3837. | Jon Leighton | 2011-12-03 | 1 | -0/+12 |
| | | | | | We also need to time zone convert time zone aware attributes when accessed via read_attribute, not only when via direct access. | ||||
* | removes the convenience instance version of AR::Base.silence_auto_explain | Xavier Noria | 2011-12-03 | 1 | -5/+2 |
| | | | | | | | Rationale: As discussed with José and Jon, this convenience shortcut is not clearly justified and it could let the user thing the disabled EXPLAINs are related to the model instance rather than being globally disabled. |