Check if the parameters on a multi-line method call or definition are aligned. Resolves: #2021
25 lines
706 B
Ruby
25 lines
706 B
Ruby
module Api
|
|
module V0
|
|
class CommentsController < ApplicationController
|
|
# before_action :set_cache_control_headers, only: [:index, :show]
|
|
caches_action :index,
|
|
cache_path: proc { |c| c.params.permit! },
|
|
expires_in: 10.minutes
|
|
respond_to :json
|
|
|
|
caches_action :show,
|
|
cache_path: proc { |c| c.params.permit! },
|
|
expires_in: 10.minutes
|
|
respond_to :json
|
|
|
|
def index
|
|
@commentable = Article.find(params[:a_id]) # or not_found
|
|
@commentable_type = "Article"
|
|
end
|
|
|
|
def show
|
|
(@comment = Comment.find(params[:id].to_i(26))) || not_found
|
|
end
|
|
end
|
|
end
|
|
end
|