Sha256: 0e64304b76a013b84151dda9d9d79db63e4aa53ff48d92b5225ed4cd1022f731
Contents?: true
Size: 667 Bytes
Versions: 22
Compression:
Stored size: 667 Bytes
Contents
# coding: UTF-8 module Daddy module Models module CrudExtension def self.included(base) base.extend(ClassMethods) base.__send__(:include, InstanceMethods) end module InstanceMethods def readable_by?(user) true end def creatable_by?(user) readable_by?(user) end def updatable_by?(user) readable_by?(user) end def deletable_by?(user) readable_by?(user) end def destroy_logically! self.deleted = true save! end end module ClassMethods end end end end
Version data entries
22 entries across 22 versions & 1 rubygems