We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6bfcbe commit beef67dCopy full SHA for beef67d
app/controllers/admin/analytics_controller.rb
@@ -44,14 +44,13 @@ def print
44
"CommunityNews" => CommunityNews
45
}.freeze
46
47
- klass = printable_models[params[:printable_type]]
48
- return head :bad_request unless klass
+ klass = printable_models[params[:printable_type]]
+ return head :bad_request unless klass
49
50
- record = klass.find_by(id: params[:printable_id])
51
- return head :not_found unless record
52
-
53
- record.increment_print_count!
+ record = klass.find_by(id: params[:printable_id])
+ return head :not_found unless record
54
+ record.increment_print_count!
55
head :ok
56
end
57
0 commit comments