aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_callbacks.md
Commit message (Collapse)AuthorAgeFilesLines
* Move touch method from Skipping Callbacks section to Running Callbacks ↵Avneet Singh Malhotra2017-11-131-1/+1
| | | | section [ci skip]
* Small grammar fixesJon Moss2017-08-161-1/+1
| | | | | | Changed sentence to be more clear [ci skip]
* [ci skip] Add documentation for after_create_commit and after_update_commit ↵jagdeepsingh2017-07-251-0/+29
| | | | callbacks
* Pluralize callbackJon Moss2017-04-101-1/+3
| | | | | | Users could have more than one `before_destroy` callback in their models. [ci skip]
* Merge pull request #28680 from vishalzambre/callback_doc_updateJon Moss2017-04-101-0/+2
|\ | | | | Documented issue related before_destroy with dependent: :destroy
| * [ci skip] documented issue related before_destroyvishalzambre2017-04-101-0/+2
| | | | | | | | Updated text
* | Fix edge guides for Active Record callbacksAlessandro Dal Grande2017-04-041-1/+5
|/
* Remove deprecate passing string to `:if` and `:unless` conditional options ↵yuuji.yaginuma2017-02-181-11/+1
| | | | | | [ci skip] Follow up to #27608
* Merge pull request #25427 from eugeneius/update_increment_documentationKasper Timm Hansen2017-01-081-2/+0
|\ | | | | Update increment! documentation [ci skip]
| * Update increment! documentation [ci skip]Eugene Kenny2016-08-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | The `increment!` and `decrement!` methods were recently reimplemented to make them safe to call from multiple connections concurrently. This changed their behaviour in a few ways. Previously they used `update_attribute`, which calls the attribute setter method, runs callbacks, and touches the record. Now they behave more like `update_column`, writing the update to the database directly and bypassing all of those steps.
* | Abuse of protected in guidesAkira Matsuda2016-12-251-3/+3
| |
* | Update docs for change in transaction callback exceptionsNathan Wenneker2016-09-031-1/+1
|/ | | | | | | | | 07d3d40 changed how exceptions are handled in after_commit and after_destroy callbacks. This commit updates the 5.0 release notes and the ActiveRecord callback guide to reflect the new behavior. [ci skip]
* [skip ci] Fix typo and simplify after_commit examplewynksaiddestroy2016-06-141-2/+2
| | | | The beginning of the note on the :on option is not capitalised correctly. The :destroy symbol in the after_commit example is unnecessarily wrapped in an array.
* Mention that halting chain does not re-raise `ActiveRecord::RecordInvalid` ↵Vipul A M2016-01-191-1/+1
| | | | | | | | exception as well, similar to `ActiveRecord::Rollback` Fixes #22297 [ci skip]
* Introduce ApplicationRecord, an Active Record layer supertypeGenadi Samokovarov2015-12-161-17/+17
| | | | | | | | | | | | | | | | It's pretty common for folks to monkey patch `ActiveRecord::Base` to work around an issue or introduce extra functionality. Instead of shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can hold all those custom work the apps may need. Now, we don't wanna encourage all of the application models to inherit from `ActiveRecord::Base`, but we can encourage all the models that do, to inherit from `ApplicationRecord`. Newly generated applications have `app/models/application_record.rb` present by default. The model generators are smart enough to recognize that newly generated models have to inherit from `ApplicationRecord`, but only if it's present.
* Introduce after_{create,update,delete}_commit callbacksGenadi Samokovarov2015-12-061-0/+19
| | | | | | | | | | | | | | | | Those are actually shortcuts for `after_commit`. Before: after_commit :add_to_index_later, on: :create after_commit :update_in_index_later, on: :update after_commit :remove_from_index_later, on: :destroy After: after_create_commit :add_to_index_later after_update_commit :update_in_index_later after_destroy_commit :remove_from_index_later
* Merge pull request #19289 from ahmad-alkheat/masterYves Senn2015-03-111-1/+1
|\ | | | | Unnecessary usage of self in the guides [ci skip]
| * Unnecessary usage of self in the guidesAhmad Al-kheat2015-03-111-1/+1
| | | | | | I deleted self from the callbacks guides code example because it's unnecessary and this way it's more like the other examples where self was not used.
* | - Changed `IN` to `ON` in markdown renderer conditionVipul A M2015-01-141-1/+1
|/ | | | - Changed `IN` to `ON` in all note sentences in guides.
* warn about reading guides in GitHubXavier Noria2014-12-231-0/+2
| | | | References #18148.
* correct markdown usage [ci skip]Nishant Modak2014-07-091-1/+1
|
* Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip]John Kelly Ferguson2014-05-211-8/+8
|
* Add after_commit/after_rollback to callback listKyle Heironimus2014-04-101-0/+3
| | | | | | Adding after_commit/after_rollback to list of callbacks in order helps explain the callback order as well as making it consistent with the API docs at http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html
* Merge pull request #13032 from kuldeepaggarwal/after_touch_documentationYves Senn2013-12-121-0/+49
|\ | | | | [ci skip] added after_touch callback documentation [ci skip]
| * [ci skip] added after_touch callback documentationKuldeep Aggarwal2013-12-121-0/+49
| | | | | | | | [ci skip] added more explanation for `after_touch` callback
* | typos rectified lifecycle => life cycleAayush khandelwal2013-12-121-1/+1
| |
* | The section that mentions after_commit and after_rollback will swallow ↵Bikram2013-11-281-1/+1
|/ | | | exceptions should me made clear. Made that section to be a instead of a regular paragraph.
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2013-11-071-2/+2
|\
| * exists? is deprecated in ruby trunk [ci skip]Rashmi Yadav2013-11-011-2/+2
| | | | | | see here 4d4ff531b8807ee88a3fc46875c7e76f613956fb
* | Rephrase ActiveRecord transaction rollback warningNate Berkopec2013-10-161-1/+1
|/ | | | [ci skip]
* Use Ruby on Rails Coding Conventions for code examples in the guidesPaul Nikitochkin2013-09-061-10/+10
| | | | | | | | * Indent after private/protected * Ruby >= 1.9 syntax for hashes * Prefer method { do_stuff } instead of method{do_stuff} for single-line blocks. [ci skip]
* Change the wording to explain following methods skip callbacks [ci skip]Prathamesh Sonpatki2013-08-191-1/+3
|
* Remove block argument from callback example.Carlos Souza2013-07-131-2/+2
| | | | [ci skip]
* 1.9 Hash SyntaxAkira Matsuda2013-07-081-1/+1
|
* Adding find_by in guide to methods that trigger after_findCristian Planas2013-07-011-0/+1
|
* update the example for `after_commit` in the guides.Yves Senn2013-02-241-9/+7
| | | | This is a follow up to #9356.
* remove 'update' duplicationsJuanjo Bazán2013-01-081-1/+0
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-091-2/+1
|\ | | | | | | | | Conflicts: guides/source/getting_started.md
| * find_all_by is deprecated in AR 4Akira Matsuda2013-01-021-2/+1
| |
* | Change guides to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-2/+2
|/
* Add #destroy! as a method that triggers callbacksPablo Torres2012-12-121-0/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-081-4/+4
|\
| * Fixed grammar in a lot of guide prologues.Katie Oldaker2012-12-071-4/+4
| |
* | Fix Active Record validation error messages markup in guidesCarlos Antonio da Silva2012-12-041-1/+1
|/ | | | | | | | | | The other way it was not marking the text as italic, it was showing the underlines as normal text. Also fixes some code examples indentation and # => marks in Active Model and Active Record guides. [ci skip]
* Split Validations and Callbacks into separate guides.Steve Klabnik2012-11-291-0/+361
Two big features that are only barely related in the same guide. Seems bad. I did not check references to these guides yet, so some links may need to be updated.