-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix strict_case_match bug #440
Conversation
if ActsAsTaggableOn.strict_case_match | ||
existing_tag = existing_tags.detect { |tag| tag.name == tag_name } | ||
else | ||
comparable_tag_name = comparable_name(tag_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make more sense to move the check for ActsAsTaggableOn.strict_case_match
into the :comparable_name
method? I think it would make more sense there to just pass the name through when strict_case_match is one.
@bf4 You are right. I have moved it into :comparable_name method. Thanks for your advice. |
@@ -72,12 +72,26 @@ | |||
ActsAsTaggableOn::Tag.find_or_create_all_with_like_by_name("AWESOME").should == [@tag] | |||
end | |||
|
|||
it "should find by name case sensitive" do | |||
ActsAsTaggableOn.strict_case_match = true | |||
lambda { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change syntax to expect { # code }.to change...
@bf4 Sure. It has been changed. |
[Fix] Comparing tag names now respects strict_case_match
[Fix] Comparing tag names now respects strict_case_match
This PR is to fix the issue from Issue #434