module Abyme::Model

Attributes

allow_destroy[RW]
permitted_attributes[R]

Public Class Methods

included(klass) click to toggle source
# File lib/abyme/model.rb, line 37
def self.included(klass)
  @permitted_attributes[klass.name] ||= {}
  @allow_destroy[klass.name] ||= {}
  klass.extend ClassMethods
end
permit_attributes(class_name, association, attributes, permit, association_class_name = nil) click to toggle source
# File lib/abyme/model.rb, line 32
def self.permit_attributes(class_name, association, attributes, permit, association_class_name = nil)
  @permitted_attributes[class_name]["#{association}_attributes".to_sym] = AttributesBuilder.new(class_name, association, attributes, permit, association_class_name)
    .build_attributes
end