leader skills only have a description
This commit is contained in:
parent
d063f75fcc
commit
be4344823a
6 changed files with 7 additions and 7 deletions
|
@ -42,7 +42,7 @@ class LeaderSkillsController < ApplicationController
|
||||||
private
|
private
|
||||||
|
|
||||||
def leader_skill_params
|
def leader_skill_params
|
||||||
params.require(:leader_skill).permit(:name, :description)
|
params.require(:leader_skill).permit(:description)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_leader_skill
|
def set_leader_skill
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
class LeaderSkill < ActiveRecord::Base
|
class LeaderSkill < ActiveRecord::Base
|
||||||
validates :name, presence: true
|
|
||||||
validates :description, presence: true
|
validates :description, presence: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
= simple_form_for @leader_skill do |f|
|
= simple_form_for @leader_skill do |f|
|
||||||
.form-inputs
|
.form-inputs
|
||||||
= f.input :name
|
|
||||||
= f.input :description
|
= f.input :description
|
||||||
.form-actions
|
.form-actions
|
||||||
= f.button :button
|
= f.button :button
|
||||||
|
|
|
@ -8,13 +8,11 @@
|
||||||
table.table.table-striped.table-hover
|
table.table.table-striped.table-hover
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th Name
|
|
||||||
th Description
|
th Description
|
||||||
th Actions
|
th Actions
|
||||||
tbody
|
tbody
|
||||||
- @leader_skills.each do |leader_skill|
|
- @leader_skills.each do |leader_skill|
|
||||||
tr
|
tr
|
||||||
td= leader_skill.name
|
|
||||||
td= leader_skill.description
|
td= leader_skill.description
|
||||||
td
|
td
|
||||||
= link_to glyph('edit', classes: 'control-icon'), edit_leader_skill_path(leader_skill)
|
= link_to glyph('edit', classes: 'control-icon'), edit_leader_skill_path(leader_skill)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveNameFromLeaderSkill < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :leader_skills, :name
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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|
|
create_table "awaken_types", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -60,7 +60,6 @@ ActiveRecord::Schema.define(version: 20151007164606) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "leader_skills", force: :cascade do |t|
|
create_table "leader_skills", force: :cascade do |t|
|
||||||
t.string "name"
|
|
||||||
t.string "description"
|
t.string "description"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
|
Loading…
Reference in a new issue