Sha256: aa94c87c18d57e960afd3a8fe167b60c8b261aa30ed1fccc58f0d83f1dad847d
Contents?: true
Size: 631 Bytes
Versions: 4
Compression:
Stored size: 631 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(attributes) 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
4 entries across 4 versions & 1 rubygems