You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Iam getting an ArgumentError in Excption in row "CustomerAttribute.where(company_id: model.company_id)" of the following code. What I am trying to do is load dynamic attributes per each customer. My AttrivuteProvider is located at rails_root/lib/attribute_provider.rb
How can I solve this issue?
class
AttributeProvider
def initialize(model)
@model = model
end
CustomerAttribute.where(company_id: model.company_id).map do |field|
ActiveDynamic::AttributeDefinition.new(field.name,
datatype: 2, #field.datatype,
required: field.required,
default_value: field.default_value)
end
end
private
attr_reader :model
end
ActiveDynamic.configure do |config|
config.provider_class = AttributeProvider
config.resolve_persisted = Proc.new { |model| model.is_a?(Employment) ? true : false }
end
The text was updated successfully, but these errors were encountered:
Iam getting an ArgumentError in Excption in row "CustomerAttribute.where(company_id: model.company_id)" of the following code. What I am trying to do is load dynamic attributes per each customer. My AttrivuteProvider is located at rails_root/lib/attribute_provider.rb
How can I solve this issue?
The text was updated successfully, but these errors were encountered: