Add a host_name field to Conference

This commit is contained in:
Petko Bordjukov 2015-08-15 06:15:18 +03:00
parent f7737f0e8e
commit 70a5bbc27a
4 changed files with 9 additions and 1 deletions

View File

@ -51,7 +51,7 @@ module Management
def conference_params def conference_params
params.require(:conference).permit( params.require(:conference).permit(
:title, :email, :start_date, :end_date, :description, :title, :email, :start_date, :end_date, :description, :host_name,
event_types_attributes: [:id, :name, :description, :_destroy], event_types_attributes: [:id, :name, :description, :_destroy],
tracks_attributes: [:id, :name, :color, :description, :_destroy], tracks_attributes: [:id, :name, :color, :description, :_destroy],
halls_attributes: [:id, :name, :_destroy] halls_attributes: [:id, :name, :_destroy]

View File

@ -7,6 +7,7 @@
.col-lg-12 .col-lg-12
= f.input :title = f.input :title
= f.input :email = f.input :email
= f.input :host_name
= f.input :start_date, as: :date = f.input :start_date, as: :date
= f.input :end_date, as: :date = f.input :end_date, as: :date
= f.input :description = f.input :description

View File

@ -109,6 +109,7 @@ bg:
conference: conference:
email: E-mail email: E-mail
title: Заглавие title: Заглавие
host_name: Домейн
start_date: Начална дата start_date: Начална дата
end_date: Крайна дата end_date: Крайна дата
description: Описание description: Описание

View File

@ -0,0 +1,6 @@
class AddHostNameToConferences < ActiveRecord::Migration
def change
add_column :conferences, :host_name, :string
add_index :conferences, :host_name
end
end