Open FunnyHector opened 3 years ago
Any idea if this would get noticed soon?
Any idea if this would get noticed soon?
@FunnyHector , can you rebase this PR. It good to merge.
Hi @seuros , I have rebased this change onto the latest master. There was some conflict with this line in #1013.
Could you please have another look?
Sorry for late response. Somehow I must have missed the ping.
@FunnyHector Do you mind merging master
back into the PR again?
@alto the only issue left here is the non i18n error message.
@seuros Yeah, the one in name_is_unique
. I agree. 👍🏻 /cc @FunnyHector
Hiya, sorry I haven't really worked on any project that used i18n :p, that often slips my mind.
I'll try to make a fix to use i18n, and rebase this work. I'm a little busy this week but hopefully I can get it done by the end of this week. Will ping you when I'm done.
@seuros @alto I've rebased this work to resolve the conflicts. I've also added a new commit to use I18n error message. Please have another look. Sorry I haven't found time to look at this until now.
@seuros Hi, I just updated this pull request with your latest master
changes (resolved conflicts). Do you mind considering a merge now? /cc @FunnyHector
Use a custom validation method to validate the uniqueness of name
The intention of this change is to address the the following deprecation seen on Rails 6:
Since there is the complexity of the config
ActsAsTaggableOn.strict_case_match
, we can't just explicitly set case_sensitive option as suggested in the deprecation warning.The tests are quite blargh to deal with since the test database has the collation set to case-insensitive and has an uniqueness index, which is not realistic. To deal with the tests, I used a similar approach as in cb8d6e65cbb65a02a05f3deb28c12d5439d745af. In cases where case sensitivity matters, we alter the collation on
name
column, run the test, then alter the collation back.This PR tries to solve the same problem mentioned in #1005, but since the author of #1005 hasn't responded, I'm trying my luck here.
This change has also adopted @graaff's suggestion