summaryrefslogtreecommitdiff
path: root/app/controllers/snippets_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r--app/controllers/snippets_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 8ea5450b4e8..bc8923703d2 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -23,7 +23,7 @@ class SnippetsController < ApplicationController
skip_before_action :authenticate_user!, only: [:index, :show, :raw]
- layout 'snippets'
+ layout "snippets"
respond_to :html
def index
@@ -33,7 +33,7 @@ class SnippetsController < ApplicationController
@snippets = SnippetsFinder.new(current_user, author: @user, scope: params[:scope])
.execute.page(params[:page])
- render 'index'
+ render "index"
else
redirect_to(current_user ? dashboard_snippets_path : explore_snippets_path)
end
@@ -73,7 +73,7 @@ class SnippetsController < ApplicationController
respond_to do |format|
format.html do
- render 'show'
+ render "show"
end
format.json do
@@ -82,7 +82,7 @@ class SnippetsController < ApplicationController
format.js do
if @snippet.embeddable?
- render 'shared/snippets/show'
+ render "shared/snippets/show"
else
head :not_found
end
@@ -106,8 +106,8 @@ class SnippetsController < ApplicationController
end
# rubocop: enable CodeReuse/ActiveRecord
- alias_method :awardable, :snippet
- alias_method :spammable, :snippet
+ alias awardable snippet
+ alias spammable snippet
def spammable_path
snippet_path(@snippet)