mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.97k stars 1.2k forks source link

Use none instead of false query #906

Closed gssbzn closed 6 years ago

gssbzn commented 6 years ago

None allows the use a null object pattern, this prevent doing further queries to the database knowing they'll always return false

Originally

posts = Post.tagged_with.recent

Would still generate queries to the database with this change Rails would always return a chainable NullObject that avoids doing further queries tothe database

seuros commented 6 years ago

Thank you, that was legacy code.

Can you update the changelog ?

gssbzn commented 6 years ago

@seuros updated 👍