Skip to content
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

Merged
merged 1 commit into from
Jan 2, 2014
Merged

fix strict_case_match bug #440

merged 1 commit into from
Jan 2, 2014

Conversation

BenZhang
Copy link

This PR is to fix the issue from Issue #434

@BenZhang BenZhang mentioned this pull request Dec 21, 2013
if ActsAsTaggableOn.strict_case_match
existing_tag = existing_tags.detect { |tag| tag.name == tag_name }
else
comparable_tag_name = comparable_name(tag_name)
Copy link
Collaborator

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.

@BenZhang
Copy link
Author

BenZhang commented Jan 1, 2014

@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 {
Copy link
Collaborator

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...

@BenZhang
Copy link
Author

BenZhang commented Jan 2, 2014

@bf4 Sure. It has been changed.

bf4 added a commit that referenced this pull request Jan 2, 2014
[Fix] Comparing tag names now respects strict_case_match
@bf4 bf4 merged commit 3a04338 into mbleigh:master Jan 2, 2014
tekniklr pushed a commit to tekniklr/acts-as-taggable-on that referenced this pull request Mar 19, 2021
[Fix] Comparing tag names now respects strict_case_match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants