diff options
Diffstat (limited to 'app/controllers/concerns/find_snippet.rb')
-rw-r--r-- | app/controllers/concerns/find_snippet.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/concerns/find_snippet.rb b/app/controllers/concerns/find_snippet.rb index d51f1a1b3ad..8a4adbb608f 100644 --- a/app/controllers/concerns/find_snippet.rb +++ b/app/controllers/concerns/find_snippet.rb @@ -9,7 +9,7 @@ module FindSnippet # rubocop:disable CodeReuse/ActiveRecord def snippet strong_memoize(:snippet) do - snippet_klass.inc_relations_for_view.find_by(id: snippet_id) + snippet_klass.inc_relations_for_view.find_by(snippet_find_params) end end # rubocop:enable CodeReuse/ActiveRecord @@ -21,4 +21,8 @@ module FindSnippet def snippet_id params[:id] end + + def snippet_find_params + { id: snippet_id } + end end |