password validation in model should override that set in plugin #13

Closed
reggieb opened this Issue Mar 1, 2010 · 1 comment

Comments

Projects
None yet
1 participant
@reggieb

reggieb commented Mar 1, 2010

I am using restful-authentication in a Rails app as a plug-in. I notice that the password validations are set within the plug-in's ByPassword module. However, if I modify these I believe my modifications could be lost if I update the plug-in or choose to use a different validation plug-in at a latter date.

I have tried entering my own password validation statement within my user model, but these seem to be over-ridden by those in the plug-in. For example: validates_length_of :password

Would it not be better if the plug-in provided default values, but these could be over-ridden by those set within the model. Surely application specific settings such as password validation rules, should be set in the model code and not the plug-in. The plug-in should provide the functionality but not the setting.

@reggieb

This comment has been minimized.

Show comment
Hide comment
@reggieb

reggieb Mar 1, 2010

Sorry - you can close this. Should have restarted my application during testing process. The validation in the model only became effective after the application was restarted. It appears that validation rules set in the model do override those in the plug-in as they should.

reggieb commented Mar 1, 2010

Sorry - you can close this. Should have restarted my application during testing process. The validation in the model only became effective after the application was restarted. It appears that validation rules set in the model do override those in the plug-in as they should.

@reggieb reggieb closed this Jan 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment