This project is archived and is in readonly mode.
When an ActiveRecord has a column named 'field', bad behavior happens
-
Joe Van Dyk
Ouch, thought I formatted it correctly.
-
Joe Van Dyk
I've attached a patch that includes the broken test and fixes the issue.
-
Joe Van Dyk
Ooops, bad patch. Better one attached.
-
Joe Van Dyk
- Tag changed from 3, activerecord to 3, activerecord, patch
-
Elad Meidar
+1 verified and applies cleanly on Master, tests pass as well... also, this may probably lead to also closing down #1742 [PATCH] serialize fails when :type => :text and :null => false with mysql only
-
cohitre
+1 on this.
-
rbxbx
was getting this failure:
1) Failure: test_should_allow_except_option_for_list_of_authors(DatabaseConnectedJsonEncodingTest)
[./test/cases/json_serialization_test.rb:179:in `test_should_allow_except_option_for_list_of_authors' ./test/cases/../../lib/../../activemodel/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__' ./test/cases/../../lib/../../activemodel/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
attached patch corrects on master.
<"[{"id":1},{"id":2}]"> expected but was <"[{"id":1,"field":null},{"id":2,"field":null}]">. -
rbxbx
- Tag changed from 3, activerecord, patch to 3, activerecord, bugmash, patch
-
sr.iniv.t
+1 on rbxbx's patch (applies cleanly on master and all tests pass). Joe's patch applies, but the test test_should_allow_except_option_for_list_of_authors fails for me.
-
Rizwan Reza
- Assigned user set to Pratik
-
Rizwan Reza
- Tag changed from 3, activerecord, bugmash, patch to 3, 3.0, activerecord, bugmash, patch
I can confirm this error still exists.
+1 verified.
The patch by rbxbx applies cleanly.
-
Rizwan Reza
- Tag changed from 3, 3.0, activerecord, bugmash, patch to 3, 3.0, activerecord, patch
-
Ryan Bigg
- State changed from new to open
- Tag changed from 3, 3.0, activerecord, patch to 3.0, activerecord, patch
- Importance changed from to
Does this error still exist guys?
-
Santiago Pastorino
- Tag changed from 3.0, activerecord, patch to 30, activerecord, patch
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
