Because you switched to a different method
Category.find_by(slug: "site-feedback")
Does not equal
Category.find_by_slug("site-feedback")
Note how in the file there is no method defined find_by, there is find_by_slug and find_by_email.
That is because find_by is built into ActiveRecord, and you are querying the category table for any record containing slug = 'whatever value you asked for', which is inherently different than using the method that exists in the category.rb file.