Sha256: 36ac2ba520722aca8d52a5afa982f5b24e23b1e59661efb0f97a48b914053630

Contents?: true

Size: 471 Bytes

Versions: 6

Compression:

Stored size: 471 Bytes

Contents

module ActiveRecord #:nodoc:
  class Base #:nodoc:
    class << self
      private
      def instantiate_with_updateable_views_inheritance_support( record )
        object = instantiate_without_updateable_views_inheritance_support( record )
        if object.class.name == self.name
          object
        else
          object.class.find( object.id )
        end
      end
      alias_method_chain :instantiate, :updateable_views_inheritance_support
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
updateable_views_inheritance-1.3.0 lib/updateable_views_inheritance/active_record.rb
updateable_views_inheritance-1.2.2 lib/updateable_views_inheritance/active_record.rb
updateable_views_inheritance-1.2.1 lib/updateable_views_inheritance/active_record.rb
updateable_views_inheritance-1.2.0 lib/updateable_views_inheritance/active_record.rb
updateable_views_inheritance-1.1.2 lib/updateable_views_inheritance/active_record.rb
updateable_views_inheritance-1.1.1 lib/updateable_views_inheritance/active_record.rb