Open longnd opened 2 years ago
While listing the keyword by all users (home page) or listing keywords of a specific user, the controller actions also call to this same method https://github.com/ltenzil/scrape/blob/6eb163261a9102f748fc789147840f7856584ef8/app/models/keyword.rb#L14-L19
but there is no need for this condition .where("value ilike ?", "%#{options[:value]}%") if no search keyword is provided
.where("value ilike ?", "%#{options[:value]}%")
I would have written something like user_query method, as it returned results even with no keywords I left it like that Will modify it like user_query method
While listing the keyword by all users (home page) or listing keywords of a specific user, the controller actions also call to this same method https://github.com/ltenzil/scrape/blob/6eb163261a9102f748fc789147840f7856584ef8/app/models/keyword.rb#L14-L19
but there is no need for this condition
.where("value ilike ?", "%#{options[:value]}%")
if no search keyword is provided