-
Notifications
You must be signed in to change notification settings - Fork 13
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
Calling ActiveRecord::Base.send(:include, PAK::ValidatesHostname) has side effects #10
Comments
I have not been working with Rails for ages and currently do not have a lot of time on my hands. Any help fixing this issue would be much appreciated. |
Rails 4 introduced ActiveModel, ActiveModel::Validations and ActiveModel::EachValidator. Instead of injecting ourselves into ActiveRecord::Base, we will be automatically picked up. This fixes KimNorgaard#10. We can now also be used on ActiveModel as well as ActiveRecord. This simplifies testing. Also * rspec-rails was dropped becasue it seems to want all of Rails loaded. We only needed one convenience method, errors_on. It has been copied into our test model. * Bumped our runtime dependency to activemodel >= 4.0. Dropped the others. * Dropped the development dependency on all of Rails. We only need ActiveModel.
@KimNorgaard I'm interested in adopting this gem. I keep having the need to do domain validation in Rails and this is the best validator I've found. Features I'd like to add:
|
Thank you for reaching out and offering help. I'm still a bit pressed on time but I'm willing to give you a commit bit and assist with pushing to rubygems when we have a stable version. |
I just pushed v1.0.10 with the bugfix from #13 to rubygems. Since your changes are breaking backwards compatibility I'd like to move to wards v1.1.0 or possibly v2.0.0. What are your thoughts? |
Thanks! I only have a couple years of Ruby experience, and this is my first time messing with a gem. I cribbed from another validation gem. I do have a lot of experience releasing Perl modules. Yes, v2.0.0 makes sense if we're breaking backwards compatibility and following semantic versioning. If you have any other compatibility breaking changes you'd like to make while we're at it, perhaps you can write them up as issues and I can have a look. |
My experience with releasing gems is also limited to this one, so I guess we are in the same boat. I once thought about doing something clever with the ALLOWED_TLDS list, specifically making it always updated, but the only way that would work would be fetching the list runtime which I'm against for obvious reasons. For now I've just updated it by hand periodically and bumped the version. I guess that suffices for most people. |
I was wondering why Rails.application.config.active_record.belongs_to_required_by_default was not working and this gem is the culprit.
I am wondering whether there is a fix for this.
The text was updated successfully, but these errors were encountered: