-
Notifications
You must be signed in to change notification settings - Fork 622
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.2.0.beta2 #212
Comments
Thanks for the heads-up. I'm not sure what needs to be done though. |
I added this test to the spec/annotate/annotate_models_spec.rb
It will pass when using ActiveRecord 4.2.0.beta2 But this test will give you the wrong annotation: Installs 'rails', '4.2.0.beta2'
add gem 'annotate' to Gemfile
change the migration file, to add the default values
And the app/model/user.rb will have wrongly annotated defaults
Since the spec doesn't fails with the mock class, it would be safe to assume that the problem is within the code that "discover" the column type... Maybe that's changed into ActiveRecord 4.2.0 |
bump any update for rails 4.2? All our annotations changed (massive diff) just because of a rails upgrade. It would be nice to have a constant annotation independent of the rails version. It seems that the column defaults are now all converted to string?
|
I'm still getting this issue on rails 4.2.0. My booleans changed as follows: -# disabled :boolean default(TRUE), not null
-# simple :boolean default(FALSE), not null
+# disabled :boolean default("1"), not null
+# simple :boolean default("0"), not null my integers like this: -# appt_email_done :integer default(0), not null
+# appt_email_done :integer default("0"), not null and my text fields like this: -# body :text
+# body :text(65535) It seems like default values are being converted to strings (or not converted back into their proper ruby types) before being added to the comment. |
Upgrading to Rails 4.2.0.beta2 changes some already annotated models:
Only integer and boolean seems to change.
The text was updated successfully, but these errors were encountered: