Commit f10b0ffc authored by marcheing's avatar marcheing

Assign the encoded content on content show action

parent 49fafa65
......@@ -5,8 +5,9 @@ class ContentsController < ApplicationController
# GET /contents/1
# GET /contents/1.json
def show
@video = @content.encoded_contents.last
redirect_to root_path, notice: I18n.t('video_has_not_finished_encoding') unless @video.state == 'finished'
@encoded_video = @content.encoded_contents.last
redirect_to root_path, notice: I18n.t('video_has_not_finished_encoding') unless @encoded_video.state == 'finished'
@video = @encoded_video.video
end
# GET /contents/new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment