-
Notifications
You must be signed in to change notification settings - Fork 58
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
Conversation
@@ -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}%")} |
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.
Line is too long. [147/80]
Use the new Ruby 1.9 hash syntax.
Space missing after comma.
Space missing inside }.
1 similar comment
@CV-Gate Hi, thanks for you pull request. Can you describe problem with |
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. |
Closed by #96 |
No description provided.