1
0
Fork 0

leader skills only have a description

This commit is contained in:
Andrew Tomaka 2015-10-07 16:17:40 -04:00
parent d063f75fcc
commit be4344823a
6 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -1,4 +1,3 @@
class LeaderSkill < ActiveRecord::Base
validates :name, presence: true
validates :description, presence: true
end

View file

@ -1,6 +1,5 @@
= simple_form_for @leader_skill do |f|
.form-inputs
= f.input :name
= f.input :description
.form-actions
= f.button :button

View file

@ -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)

View file

@ -0,0 +1,5 @@
class RemoveNameFromLeaderSkill < ActiveRecord::Migration
def change
remove_column :leader_skills, :name
end
end

View file

@ -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