1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides
George Claghorn fc3acf2e8d Add change tracking methods for belongs_to associations
Permit checking whether a belongs_to association has been pointed to a new target record in the previous save and whether it will point to a new target record in the next save.

    post.category # => #<Category id: 1, name: "Ruby">

    post.category = Category.second   # => #<Category id: 2, name: "Programming">
    post.category_changed?            # => true
    post.category_previously_changed? # => false

    post.save!

    post.category_changed?            # => false
    post.category_previously_changed? # => true
2021-07-19 14:39:13 -04:00
..
assets Merge pull request #42799 from lloydk/header-footer-contrast 2021-07-16 13:11:12 -04:00
bug_report_templates Fix bug report templates that are failing to run because rails 6.1.0 is dependant on mimemagic 2021-06-30 21:22:33 +01:00
rails_guides use ruby 2.7's filter_map instead of select + map 2021-04-26 17:55:33 -04:00
source Add change tracking methods for belongs_to associations 2021-07-19 14:39:13 -04:00
.document
CHANGELOG.md ActiveStorage: The parameters sent to ffmpeg for are now configurable 2021-06-16 14:15:34 +12:00
rails_guides.rb
Rakefile Use Bundler.unbundled_system for bug_report_templates tests 2021-06-02 23:27:17 +09:00
w3c_validator.rb