Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom fields #41

Open
asiniy opened this issue Apr 1, 2014 · 1 comment
Open

Custom fields #41

asiniy opened this issue Apr 1, 2014 · 1 comment
Labels

Comments

@asiniy
Copy link

asiniy commented Apr 1, 2014

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

@JDutil
Copy link
Owner

JDutil commented Apr 1, 2014

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 JDutil added the feature label Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants