contact_us icon indicating copy to clipboard operation
contact_us copied to clipboard

Custom fields

Open asiniy opened this issue 11 years ago • 1 comments

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

asiniy avatar Apr 01 '14 02:04 asiniy

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.

JDutil avatar Apr 01 '14 08:04 JDutil