Commit 255b17ef authored by Rafael Reggiani Manzo's avatar Rafael Reggiani Manzo

Merge branch 'remove_description_from_content' into 'master'

Remove description from content

According to Alexandre, there is no need for a description field for video.

See merge request !17
parents ce6a6481 4230da8f
Pipeline #3629431 passed with stage
in 8 minutes and 29 seconds
......@@ -34,6 +34,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, :video)
params.require(:content).permit(:title, :user_id, :adult, :rating, :soundtrack, :view_count, :deleted, :zip_code, :director, :co_director, :team, :allow_comments, :video)
end
end
......@@ -70,14 +70,6 @@
<%= f.text_field :title, required: true, id: 'video-title' %>
</div>
</fieldset>
<fieldset>
<div class="field-label">
<%= f.label t('description'), for: 'video-description' %>
</div>
<div class="field-item">
<%= f.text_field :description, id: 'video-description' %>
</div>
</fieldset>
<fieldset>
<div class="field-label">
<%= f.label "#{t('director')} *", for: 'video-director' %>
......
......@@ -5,11 +5,6 @@
<%= @content.title %>
</p>
<p>
<strong>Description:</strong>
<%= @content.description %>
</p>
<p>
<strong>User:</strong>
<%= @content.user_id %>
......
class RemoveDescriptionFromContent < ActiveRecord::Migration[5.0]
def change
remove_column :contents, :description
end
end
......@@ -11,11 +11,10 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160624142640) do
ActiveRecord::Schema.define(version: 20160701135238) do
create_table "contents", force: :cascade do |t|
t.string "title", null: false
t.string "description"
t.integer "user_id", null: false
t.boolean "adult", default: false, null: false
t.integer "rating"
......
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