Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koss-lebedev/4d4d444a25a76cd6d1685e6498a61130 to your computer and use it in GitHub Desktop.
Save koss-lebedev/4d4d444a25a76cd6d1685e6498a61130 to your computer and use it in GitHub Desktop.
class ContactAttributeProvider
def initialize(model)
@model = model
end
def call
ContactAttribute.all.map do |attr|
ActiveDynamic::AttributeDefinition.new(
attr.name, datatype: attr.datatype,
required: attr.required?
)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment