-
Notifications
You must be signed in to change notification settings - Fork 225
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
rails 4.1 deprecates Validator#setup #114
Conversation
Yeah, the However, I've tried out this patch in my own project, and can confirm that the deprecation warnings are gone, and all my tests still pass. Hope that helps.
cc: @adzap |
Here's another solution from @yabawock. |
yes, it's better to rely on respond_to? :deprecated_setup than on a version |
Hmm I'm not sure you should close this, unless there's another PR I'm not On Monday, April 7, 2014, Vlad Bokov notifications@github.com wrote:
Jared Beck * (607) 216-5373 * jared@jaredbeck.com |
Actually, Replacing it with I've sent a pull request with this solution: #117 |
I've yet another approach to this using version detection: felixbuenemann/validates_timeliness@b04193d |
I prefer a method based on actual behaviour rather than version numbers, but I do like the way you've put it in a constant. |
I think your version is fine for this case. |
👍 @felixbuenemann I like the constant too. Let's move this conversation over to #117 since this PR is closed. |
- A few things here that took some figuring out, hence not putting it into the first commit: - The `validates_timeliness` gem (used for `validate_date` in models here) uses the now deprecated `Validator#setup` method within it, according to adzap/validates_timeliness#113 and adzap/validates_timeliness#114. This gem seems not to be actively maintained anymore, at least at the point of those PRs, so someone forked it and fixed the issues, releasing version 3.1.1 of jc-validates_timeliness. In order for these deprecation warnings to not flood the test output, I switched this app to use the new gem.
- A few things here that took some figuring out, hence not putting it into the first commit: - The `validates_timeliness` gem (used for `validate_date` in models here) uses the now deprecated `Validator#setup` method within it, according to adzap/validates_timeliness#113 and adzap/validates_timeliness#114. This gem seems not to be actively maintained anymore, at least at the point of those PRs, so someone forked it and fixed the issues, releasing version 3.1.1 of jc-validates_timeliness. In order for these deprecation warnings to not flood the test output, I switched this app to use the new gem.
- A few things here that took some figuring out, hence not putting it into the first commit: - The `validates_timeliness` gem (used for `validate_date` in models here) uses the now deprecated `Validator#setup` method within it, according to adzap/validates_timeliness#113 and adzap/validates_timeliness#114. This gem seems not to be actively maintained anymore, at least at the point of those PRs, so someone forked it and fixed the issues, releasing version 3.1.1 of jc-validates_timeliness. In order for these deprecation warnings to not flood the test output, I switched this app to use the new gem.
- A few things here that took some figuring out, hence not putting it into the first commit: - The `validates_timeliness` gem (used for `validate_date` in models here) uses the now deprecated `Validator#setup` method within it, according to adzap/validates_timeliness#113 and adzap/validates_timeliness#114. This gem seems not to be actively maintained anymore, at least at the point of those PRs, so someone forked it and fixed the issues, releasing version 3.1.1 of jc-validates_timeliness. In order for these deprecation warnings to not flood the test output, I switched this app to use the new gem.
looks some kind of ugly, but i'd rather not to bump version because of this change