Sha256: 0d945d9b720a045360abe465296dc612825a2a557613b32ca2ff20ffed5dc9c0
Contents?: true
Size: 861 Bytes
Versions: 63
Compression:
Stored size: 861 Bytes
Contents
module Her module Model # This module includes basic functionnality to Her::Model module Base extend ActiveSupport::Concern # Returns true if attribute_name is # * in resource attributes # * an association # # @private def has_key?(attribute_name) has_attribute?(attribute_name) || has_association?(attribute_name) end # Returns # * the value of the attribute_name attribute if it's in orm data # * the resource/collection corrsponding to attribute_name if it's an association # # @private def [](attribute_name) get_attribute(attribute_name) || get_association(attribute_name) end # @private def singularized_resource_name self.class.name.split('::').last.tableize.singularize end end end end
Version data entries
63 entries across 63 versions & 5 rubygems