ltenzil / scrape

Scrape talks about building reports on user entered keywords and its search results (Google)
0 stars 0 forks source link

Keyword listing isn't efficient #17

Open longnd opened 2 years ago

longnd commented 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

ltenzil commented 2 years ago

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