Sha256: 5bda47f5409c25599f2c7c7eca753c69caf1f7cba50898ca4b8c58fd0067e4ca
Contents?: true
Size: 632 Bytes
Versions: 9
Compression:
Stored size: 632 Bytes
Contents
module CouchPotato module Persistence module ActiveModelCompliance begin require 'active_model' def self.included(base) base.extend ClassMethods end def to_model self end def errors super || [] end def destroyed? !!_deleted end module ClassMethods def model_name @model_name ||= ::ActiveModel::Name.new(self) end end rescue LoadError, NameError # if it's not installed you probably don't want to use it anyway end end end end
Version data entries
9 entries across 9 versions & 1 rubygems