lib/maglev/active_model/when_change.rb
# this callback is ran before_save unless it is called inside of a "unprotected" block
this callback is ran before_save unless it is called inside of a "unprotected" block
this callback is ran before_save unless it is called inside of a " unprotected " block
def protect(callback = :before_save, &block)
          add_callback(callback) do |from, to|
            unless @unprotected
              instance_exec(from, to, &block)
            end
          end
        end
def protect ( callback = :before_save , & block ) add_callback ( callback ) do | from , to | unless @unprotected instance_exec ( from , to , & block ) end end end
this callback is ran before_save unless it is called inside of a "unprotected" block
this callback is ran before_save unless it is called inside of a " unprotected " block
callback
<not_specific>
block
<not_specific>