remove unecessary '.limit(1)'

This commit is contained in:
Régis Hanol
2017-02-24 12:56:13 +01:00
parent ecdae9f863
commit fdf749770b
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ class ApplicationController < ActionController::Base
json = ApplicationController.banner_json_cache["json"]
unless json
topic = Topic.where(archetype: Archetype.banner).limit(1).first
topic = Topic.where(archetype: Archetype.banner).first
banner = topic.present? ? topic.banner : {}
ApplicationController.banner_json_cache["json"] = json = MultiJson.dump(banner)
end