Closed jarl-dk closed 8 years ago
I have created support for rails4.
Notice that the two last commits (81c5526 and f83b4e6) changes the tests, and these commits may not be the right thing to do. I am especially worried about the last one. It seems like default behaviour has changed, but I haven't figured out whether that is because default behaviour in Rails has changed, or because there is still things in validates_timeliness that needs to be done (for rails4).
Hope this will be reviewed/merged soon because gem is really broken with rails4 and enable_date_time_select_extension
/enable_multiparameter_extension
enabled.
:+1: Any prevision of when can this be merged?
+1 , I hope this can be merged soon as well!
+1
:+1:
Any update when this will be merged for Rails 4?
Given this merge has been pending for long, is it safe to assume that this project is not being maintained actively?
Is there any way to use this in a rails 4 project or are there any alternatives for date/time validation in rails4? We have a rails 4 app that needs to go out to production very soon, so was wondering,
Sorry all. This is not abandoned at all.
@adzap Great. Any release date for the Rails 4 merge?
This has to be reviewed and merged, if all goes well then this or next week.
:thumbsup: Cheers mate, hopefully sooner than later.
Have you tried this merge yourself out of interest? More testing against real apps will be helpful.
On Feb 3, 2014, at 7:01 PM, Kapil notifications@github.com wrote:
Cheers mate, hopefully sooner than later.
— Reply to this email directly or view it on GitHub.
I have tried it against my own project, and it works. However to be honest I am not done converting my project to 4.0 yet (other gems and rails bugs have prolonged the process). Please, can other provide info of real-world experience with this PR.
I've been using it in a production project for a couple months (which probably wasn't a very good idea) and didn't run into any issues. All good. I'm not doing anything fancy, though, just basic validations.
On Feb 3, 2014, at 5:53 AM, Jarl Friis notifications@github.com wrote:
I have tried it against my own project, and it works. However to be honest I am not done converting my project to 4.0 yet (other gems and rails bugs have prolonged the process). Please, can other provide info of real-world experience with this PR.
— Reply to this email directly or view it on GitHub.
+1 using this branch for month in production and no problem.
2014-02-03 Elomar Souza notifications@github.com:
I've been using it in a production project for a couple months (which probably wasn't a very good idea) and didn't run into any issues. All good. I'm not doing anything fancy, though, just basic validations.
On Feb 3, 2014, at 5:53 AM, Jarl Friis notifications@github.com wrote:
I have tried it against my own project, and it works. However to be honest I am not done converting my project to 4.0 yet (other gems and rails bugs have prolonged the process). Please, can other provide info of real-world experience with this PR.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/adzap/validates_timeliness/pull/101#issuecomment-33933565 .
I just tried the rails4
branch and I am seeing this -
DEPRECATION WARNING: The `Validator#setup` instance method is deprecated and will be removed on Rails 4.2. Do your setup in the constructor instead:
class MyValidator < ActiveModel::Validator
def initialize(options={})
super
options[:class].send :attr_accessor, :custom_attribute
end
end
. (called from initialize at /Users/kapil/.rbenv/versions/2.1.0-dev/lib/ruby/gems/2.1.0/bundler/gems/validates_timeliness-00ce472d3e04/lib/validates_timeliness/validator.rb:45)
Using the following:
gem 'validates_timeliness', github: 'adzap/validates_timeliness', branch: 'rails4'
The error message tells you how to fix it too, just move the code from setup to the initializer directly.
The error message tells you how to fix it too, just move the code from setup to the initializer directly.
I think this fix has to happen in validates_timeliness/lib/validates_timeliness/validator.rb
, no?
I've also been running this in production for a bit and haven't had any problems yet.
Will this be merged anytime soon? We are waiting to upgrade an application to Rails 4 that uses enable_date_time_select_extension.
Same here, works fine on Rails 4.0 in production for a while now. Please merge.
:+1:
@adzap do you need help with maintaining this gem? I use it quite a lot at work so can assure interest in keeping it alive.
Thank you for the PR! This warrants a version bump and an update to the Readme, I'd say...
@adzap : as an addition to https://github.com/adzap/validates_timeliness/pull/101#issuecomment-33933235, I have converted my project to Rails 4 completely and this patch is necessary and sufficient to support rails 4.
Will you merge this one? It seems that many others have tested this.
@adzap : are you looking for some support in maintaining/updating this project?
:+1: @jarl-dk
I have released v4 which hopefully gives full Rails 4.x support. It is Rails 4.x compatible only.
Thanks for your patience.
Adding test for rails 4. Demonstrating the problem in https://github.com/adzap/validates_timeliness/issues/100