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

Fixes ArgumentError search scope #70

Closed
wants to merge 5 commits into from
Closed

Conversation

CV-Gate
Copy link

@CV-Gate CV-Gate commented Jan 4, 2015

No description provided.

@@ -12,7 +12,7 @@ module ClassMethods
def initialize_scopes
scope :are_from, lambda { |*args| where(:sent_messageable_id => args.first, :sent_messageable_type => args.first.class.name) }
scope :are_to, lambda { |*args| where(:received_messageable_id => args.first, :received_messageable_type => args.first.class.name) }
scope :search, lambda { |*args| where("body like :search_txt or topic like :search_txt",:search_txt => "%#{args.first}%")}
scope :text_search, lambda { |*args| where("body like :search_txt or topic like :search_txt",:search_txt => "%#{args.first}%")}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [147/80]
Use the new Ruby 1.9 hash syntax.
Space missing after comma.
Space missing inside }.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 97355f7 on CV-Gate:master into 63b8b0e on LTe:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 97355f7 on CV-Gate:master into 63b8b0e on LTe:master.

@LTe
Copy link
Owner

LTe commented Jan 10, 2015

@CV-Gate Hi, thanks for you pull request. Can you describe problem with search scope?

@LTe
Copy link
Owner

LTe commented Jan 10, 2015

@CV-Gate I see that this is related to #62. I think this scope name should be configurable. Because there can be another gem that define text_search method. In this way, we come back to the starting point.

@CV-Gate
Copy link
Author

CV-Gate commented Jan 10, 2015

Hello LTe, yes, configurable is a good option but at this moment it's colliding with Active Admin that is very widely used. I think that even being configurable it won't be a bad idea to change de default name.

@LTe
Copy link
Owner

LTe commented Apr 19, 2020

Closed by #96

@LTe LTe closed this Apr 19, 2020
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.

4 participants