contact_us
contact_us copied to clipboard
Custom fields
I think many users, not just I, need custom fields, like phone, address, et.c. Can I refactor list of custom attributes with their validation like that:
config.fields = [:email, :phone]
validates :email, presence: true, email: true
validates :phone, numericality: { only_integer: true }, allow_nil: true
Is there any way?
If no, I want to refactor this gem and provide the ability to make a custom fields
If you would like to refactor to work with configurable fields I would accept it so long as it is fully tested. I don't have the time or desire to make that sort of change myself since it is already pretty simple to extend it to do what you want as it is with a decorator.