73322a0e55
Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
23 lines
466 B
Ruby
23 lines
466 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Boards
|
|
class ApplicationController < ::ApplicationController
|
|
respond_to :json
|
|
|
|
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
|
|
|
|
private
|
|
|
|
def board
|
|
@board ||= Board.find(params[:board_id])
|
|
end
|
|
|
|
def board_parent
|
|
@board_parent ||= board.parent
|
|
end
|
|
|
|
def record_not_found(exception)
|
|
render json: { error: exception.message }, status: :not_found
|
|
end
|
|
end
|
|
end
|