Commit c6eb7c95 authored by marcheing's avatar marcheing Committed by Diego de Araújo Martinez Camarinha

Update content controller params and notice after creation

Now there should be an uploaded video parameter along with an association
with the current user on creation.
Signed-off-by: Diego de Araújo Martinez Camarinha's avatarDiego Araújo <>
parent 4543b2e3
......@@ -25,10 +25,11 @@ class ContentsController < ApplicationController
# POST /contents.json
def create
@content =
@content.user_id =
respond_to do |format|
format.html { redirect_to @content, notice: 'Content was successfully created.' }
format.html { redirect_to @content, notice: I18n.t('successfully_created_video') }
format.json { render :show, status: :created, location: @content }
format.html { render :new }
......@@ -69,6 +70,6 @@ class ContentsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def content_params
params.require(:content).permit(:title, :description, :user_id, :adult, :rating, :soundtrack, :view_count, :deleted, :zip_code, :director, :co_director, :team, :allow_comments)
params.require(:content).permit(:title, :description, :user_id, :adult, :rating, :soundtrack, :view_count, :deleted, :zip_code, :director, :co_director, :team, :allow_comments, :video)
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