No need for before_action

This commit is contained in:
Marcin Kulik 2014-10-19 13:25:51 +02:00
parent b525c7e3b5
commit f461f24326

View File

@ -1,8 +1,6 @@
module Api
class AsciicastsController < BaseController
before_action :load_asciicast, only: [:show]
respond_to :html, :js, only: [:show]
attr_reader :asciicast
@ -17,6 +15,8 @@ module Api
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
@ -29,10 +29,6 @@ module Api
private
def load_asciicast
@asciicast = Asciicast.find(params[:id])
end
def attributes
AsciicastParams.build(params[:asciicast], request.user_agent)
end