From 72c012a5dfd113136f06d5cd22fd2f19e0181aa3 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 23 Oct 2015 13:41:19 -0400 Subject: [PATCH] Show all relevant passive skill details --- app/models/passive_skill.rb | 4 ++++ app/views/admin/cards/_form.html.slim | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/passive_skill.rb b/app/models/passive_skill.rb index 835e035..fa07c6f 100644 --- a/app/models/passive_skill.rb +++ b/app/models/passive_skill.rb @@ -6,4 +6,8 @@ class PassiveSkill < ActiveRecord::Base uniqueness: { scope: :name } default_scope { order(:name) } + + def full + "#{name} - #{description}" + end end diff --git a/app/views/admin/cards/_form.html.slim b/app/views/admin/cards/_form.html.slim index aef3d73..7d36a90 100644 --- a/app/views/admin/cards/_form.html.slim +++ b/app/views/admin/cards/_form.html.slim @@ -17,8 +17,9 @@ .row .col-md-6 = f.association :leader_skill, label_method: :description - .col-md-6 - = f.association :passive_skill + .row + .col-md-12 + = f.association :passive_skill, label_method: :full .row .col-md-12 = f.association :super_attack, label_method: :full