def to_hbs
      h = {:model => self.class.name.downcase}
      self.hbs_attributes.each do |attr|
        h[attr] = self.send(attr)

        ans = h[attr].class.ancestors
        if h[attr].class.respond_to?(:hbs_serializable) || ans.include?(Enumerable) || ans.include?(ActiveModel::Validations)
          h[attr] = h[attr].to_hbs
        else
        end
      end
      h
    end
def to_hbs
      h = {:model => self.class.name.downcase}
      self.hbs_attributes.each do |attr|
        h[attr] = self.send(attr)

        ans = h[attr].class.ancestors
        if h[attr].class.respond_to?(:hbs_serializable) || ans.include?(Enumerable) || ans.include?(ActiveModel::Validations)
          h[attr] = h[attr].to_hbs
        else
        end
      end
      h
    end
Serialize instance attributes to a Hash based on serializable attributes defined on Model class.
 @return [Hash] hash of model instance attributes