This project is archived and is in readonly mode.
validates_uniqueness_of does not quote scoped column names and then barfs
-
Santiago Pastorino
ara.t.howard please follow this to send us a patch https://rails.lighthouseapp.com/projects/8994/sending-patches
Also you need to do a failing test case, i want to help you to get the patch applied ;). -
José Valim
- Milestone cleared.
- Assigned user changed from Santiago Pastorino to José Valim
-
ara.t.howard
i won't have time to work up tests for a bit, but haven't forgotten.
-
Neeraj Singh
I believe this is no longer an issue in rails edge. Howard can you verify that.
-
Kane
also think this is no longer an issue. edge uses arel where clause for the scopes and no longer string concatination.
-
ara.t.howard
just to be clear - this is and activerecord issue - not a 'rails' issue. moving to a rails milestone seems like a bad plan. for sure people will be using ar 2x for year(s) to come right? in fact, the project i'm seeing the issue in is a financial cli - not a rails app.
-
Kane
patch for 2.3 appended
-
José Valim
Kane, your patch broke other tests on AR suite. Could you please take a look at them? Thanks!
-
Neeraj Singh
Attached are the patches for the tests which were failing by applying the patch.
-
Neeraj Singh
In rails3 Topics table does not have a column named 'group'.
In my view it is a good idea to bring that column in rails3 Topic model to ensure that nothing breaks if a user decides to have a column named 'group'. José lemme know your thoughts. If needed I can create a patch for rails3 and add column 'group' to Topics.
-
José Valim
Neeraj: about Rails 3, sounds good!
-
Repository
- State changed from new to resolved
(from [09a23d22908813f4b572d8c676325a12c51cfa9a]) quote scoped columns in validates_uniqueness_of [#4909 validates_uniqueness_of does not quote scoped column names and then barfs state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/09a23d22908813f4b572d8c676325a... -
ara.t.howard
thanks for that guys. a small but nasty bug when it hits.
cheers.
