Sha256: 0d51c30fd04da0171339534f3a4a20ee31b11eb4c01a48f0cc605df1d549776b
Contents?: true
Size: 694 Bytes
Versions: 21
Compression:
Stored size: 694 Bytes
Contents
require_relative 'destroy_all' require_relative 'update' require_relative 'find_by' require_relative 'init' module ActiveMocker module ActiveHash module ARApi include ::ActiveHash::ARApi::Update include ::ActiveHash::ARApi::Init def self.included(base) base.extend(ClassMethods) end module ClassMethods include ::ActiveHash::ARApi::DestroyAll include ::ActiveHash::ARApi::FindBy def find_or_create_by(attributes) find_by(attributes) || create(attributes) end def find_or_initialize_by(attributes) find_by(attributes) || new(attributes) end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems