|
- class DeerjikistsController < ApplicationController
- def show
- platform = params[:platform].to_s.strip
- code = params[:code].to_s.strip
- return head :bad_request if platform.blank? || code.blank?
-
- deerjikist = Deerjikist
- .joins(:tag)
- .includes(:tag, tag: :tag_name)
- .find_by(platform:, code:)
- if deerjikist
- render json: DeerjikistRepr.base(deerjikist)
- else
- head :not_found
- end
- end
- end
|