aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
Commit message (Collapse)AuthorAgeFilesLines
* copy edits [ci skip]Vijay Dev2012-11-031-6/+3
|
* update AR::ImmutableRelation documentation [ci skip]Francesco Rodriguez2012-10-261-0/+14
|
* Support for specifying transaction isolation levelJon Leighton2012-09-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your database supports setting the isolation level for a transaction, you can set it like so: Post.transaction(isolation: :serializable) do # ... end Valid isolation levels are: * `:read_uncommitted` * `:read_committed` * `:repeatable_read` * `:serializable` You should consult the documentation for your database to understand the semantics of these different levels: * http://www.postgresql.org/docs/9.1/static/transaction-iso.html * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html An `ActiveRecord::TransactionIsolationError` will be raised if: * The adapter does not support setting the isolation level * You are joining an existing open transaction * You are creating a nested (savepoint) transaction The mysql, mysql2 and postgresql adapters support setting the transaction isolation level. However, support is disabled for mysql versions below 5, because they are affected by a bug (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level gets persisted outside the transaction.
* Fixes #6825, adds tests covering cases and error possibilities, also changes ↵Mauricio Linhares2012-06-271-7/+3
| | | | SQLite3 driver to correctly generate a time column instead of datetime
* disallow mutating a relation once loadedJon Leighton2012-06-221-0/+3
|
* + ActiveRecord::Base#destroy!Marc-Andre Lafortune2012-06-061-0/+4
|
* Consider attempted action in exception message of ActiveRecord::StaleObjectErrorChristian Bäuerlein2011-10-141-4/+5
|
* Includes stale record in StaleObjectErrorChristian Bäuerlein2011-10-141-0/+9
|
* Raise an exception on unknown primary key inside AssociationReflection.Jon Leighton2011-10-051-0/+13
| | | | | An association between two models cannot be made if a relevant key is unknown, so fail fast rather than generating invalid SQL. Fixes #3207.
* Revert "Raise error on unknown primary key."Jon Leighton2011-10-051-14/+0
| | | | This reverts commit ee2be435b1e5c0e94a4ee93a1a310e0471a77d07.
* Raise error on unknown primary key.Jon Leighton2011-10-051-0/+14
| | | | | If we don't have a primary key when we ask for it, it's better to fail fast. Fixes GH #2307.
* :conditions => whereAkira Matsuda2011-07-081-1/+1
|
* find(:all) => allAkira Matsuda2011-07-081-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-4/+4
| | | | 's/[ \t]*$//' -i {} \;)
* ensuring that description does not exceed 100 columnsNeeraj Singh2010-08-021-5/+9
|
* Adds title.Rizwan Reza2010-06-151-0/+3
|
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-0/+165
add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook