From 716c243def156edf16765e7cd2e3240075a5ef22 Mon Sep 17 00:00:00 2001 From: Rizwan Reza Date: Mon, 14 Jun 2010 13:38:29 +0430 Subject: [PATCH] Minor changes to active_model/callbacks.rb and dirty.rb --- activemodel/lib/active_model/callbacks.rb | 2 +- activemodel/lib/active_model/dirty.rb | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb index f41a3e8ea5..257644b3fa 100644 --- a/activemodel/lib/active_model/callbacks.rb +++ b/activemodel/lib/active_model/callbacks.rb @@ -2,7 +2,7 @@ require 'active_support/core_ext/array/wrap' require 'active_support/callbacks' module ActiveModel - # == Active Model Callbacks + # == Active Model Call Backs # # Provides an interface for any class to have Active Record like callbacks. # diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index bbcc345e4b..a82ce1bee0 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -4,16 +4,21 @@ require 'active_support/hash_with_indifferent_access' require 'active_support/core_ext/object/duplicable' module ActiveModel - # ActiveModel::Dirty provides a way to track changes in your - # object in the same way as ActiveRecord does. + # == Active Model Call Backs + # + # Provides a way to track changes in your object in the same way as + # Active Record does. # - # The requirements to implement ActiveModel::Dirty are: + # The requirements to implement ActiveModel::Dirty are to: # # * include ActiveModel::Dirty in your object - # * Call define_attribute_methods passing each method you want to track - # * Call attr_name_will_change! before each change to the tracked attribute + # * Call define_attribute_methods passing each method you want to + # track + # * Call attr_name_will_change! before each change to the tracked + # attribute # - # If you wish to also track previous changes on save or update, you need to add + # If you wish to also track previous changes on save or update, you need to + # add # # @previously_changed = changes #