Sha256: b98105c1161a42b0a9511f32b331eccba996f876dfa8deb6270955f6db6c3dc0
Contents?: true
Size: 645 Bytes
Versions: 21
Compression:
Stored size: 645 Bytes
Contents
module Mobility module ActiveModel =begin Backend resetter for ActiveModel models. Adds hook to reset backend when +changes_applied+ or +clear_changes_information+ methods are called on model. =end class BackendResetter < Mobility::BackendResetter # (see Mobility::BackendResetter#initialize) def initialize(attribute_names, &block) super model_reset_method = @model_reset_method %i[changes_applied clear_changes_information].each do |method| define_method method do super() instance_eval(&model_reset_method) end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems