diff --git a/app/controllers/leader_skills_controller.rb b/app/controllers/leader_skills_controller.rb index 545bbe5..a841cec 100644 --- a/app/controllers/leader_skills_controller.rb +++ b/app/controllers/leader_skills_controller.rb @@ -42,7 +42,7 @@ class LeaderSkillsController < ApplicationController private def leader_skill_params - params.require(:leader_skill).permit(:name, :description) + params.require(:leader_skill).permit(:description) end def set_leader_skill diff --git a/app/models/leader_skill.rb b/app/models/leader_skill.rb index ed9757a..36e8a22 100644 --- a/app/models/leader_skill.rb +++ b/app/models/leader_skill.rb @@ -1,4 +1,3 @@ class LeaderSkill < ActiveRecord::Base - validates :name, presence: true validates :description, presence: true end diff --git a/app/views/leader_skills/_form.html.slim b/app/views/leader_skills/_form.html.slim index 269ec02..df2300c 100644 --- a/app/views/leader_skills/_form.html.slim +++ b/app/views/leader_skills/_form.html.slim @@ -1,6 +1,5 @@ = simple_form_for @leader_skill do |f| .form-inputs - = f.input :name = f.input :description .form-actions = f.button :button diff --git a/app/views/leader_skills/index.html.slim b/app/views/leader_skills/index.html.slim index 3d8255a..6b4e250 100644 --- a/app/views/leader_skills/index.html.slim +++ b/app/views/leader_skills/index.html.slim @@ -8,13 +8,11 @@ table.table.table-striped.table-hover thead tr - th Name th Description th Actions tbody - @leader_skills.each do |leader_skill| tr - td= leader_skill.name td= leader_skill.description td = link_to glyph('edit', classes: 'control-icon'), edit_leader_skill_path(leader_skill) diff --git a/db/migrate/20151007201555_remove_name_from_leader_skill.rb b/db/migrate/20151007201555_remove_name_from_leader_skill.rb new file mode 100644 index 0000000..169c942 --- /dev/null +++ b/db/migrate/20151007201555_remove_name_from_leader_skill.rb @@ -0,0 +1,5 @@ +class RemoveNameFromLeaderSkill < ActiveRecord::Migration + def change + remove_column :leader_skills, :name + end +end diff --git a/db/schema.rb b/db/schema.rb index 4c707de..9a73c36 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151007164606) do +ActiveRecord::Schema.define(version: 20151007201555) do create_table "awaken_types", force: :cascade do |t| t.string "name" @@ -60,7 +60,6 @@ ActiveRecord::Schema.define(version: 20151007164606) do end create_table "leader_skills", force: :cascade do |t| - t.string "name" t.string "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false