Check out ActiveModel::Dirty (available on all models by default). The documentation is really good, but it lets you do things such as:
@user.street1_changed? # => true/false
More Related Contents:
- Can’t find the ‘libpq-fe.h header when trying to install pg gem
- ActiveRecord OR query
- ActiveRecord: size vs count
- How can I disable logging of asset pipeline (sprockets) messages in Ruby on Rails 3.1?
- PG undefinedtable error relation users does not exist
- Rails routing to handle multiple domains on single application
- Rails .where vs .find
- Path helpers generate paths with dots instead of slashes
- Rails config.assets.precompile setting to process all CSS and JS files in app/assets
- How to get a query string from a URL in Rails
- Rails 3 – select with Include?
- belongs_to through associations
- Check if record exists from controller in Rails
- Extending controllers of a Rails 3 Engine in the main app
- How to get a Date from date_select or select_date in Rails?
- counter_cache with has_many :through
- How can I specify a local gem in my Gemfile?
- What is the right way to override a setter method in Ruby on Rails?
- SimpleForm without for (non model form)
- How to change a Ruby on Rails application name?
- How to define action with simple form for?
- How to access instance variables in CoffeeScript engine inside a Slim template
- association named not found perhaps misspelled issue in rails association
- skip certain validation method in Model
- Ruby: problem installing EventMachine under Windows 7
- Ruby on rails 4 app does not work in iframe
- Rendering partial in js.erb file
- Rails 3 – Speed up Console Loading Time
- How to create app-wide slug routing for Rails app?
- Rails: Order with nulls last