From c12f8abdb8076feeb85a073c64f8d50dd022dddc Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 12 Aug 2015 18:48:37 -0300 Subject: [PATCH] Add title to badge --- db/migrate/20150330102818_create_badges.rb | 1 + lib/gamification_plugin/badge.rb | 2 +- views/gamification/dashboard.html.erb | 4 ++-- views/gamification_plugin_badges/_form.html.erb | 4 ++++ views/gamification_plugin_badges/index.html.erb | 4 ++-- views/gamification_plugin_badges/show.html.erb | 5 +++++ 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/db/migrate/20150330102818_create_badges.rb b/db/migrate/20150330102818_create_badges.rb index 7ed30ea..51cf0b0 100644 --- a/db/migrate/20150330102818_create_badges.rb +++ b/db/migrate/20150330102818_create_badges.rb @@ -3,6 +3,7 @@ class CreateBadges < ActiveRecord::Migration create_table :gamification_plugin_badges do |t| t.string :name t.integer :level + t.string :title t.string :description t.string :custom_fields t.references :owner, :polymorphic => true diff --git a/lib/gamification_plugin/badge.rb b/lib/gamification_plugin/badge.rb index 83f4e2c..503823a 100644 --- a/lib/gamification_plugin/badge.rb +++ b/lib/gamification_plugin/badge.rb @@ -4,7 +4,7 @@ class GamificationPlugin::Badge < Noosfero::Plugin::ActiveRecord has_many :badges_sash, :class_name => 'Merit::BadgesSash' - attr_accessible :owner, :name, :description, :level, :custom_fields + attr_accessible :owner, :name, :description, :level, :custom_fields, :title serialize :custom_fields diff --git a/views/gamification/dashboard.html.erb b/views/gamification/dashboard.html.erb index 5bf9d12..ed0c5b1 100644 --- a/views/gamification/dashboard.html.erb +++ b/views/gamification/dashboard.html.erb @@ -38,9 +38,9 @@