Merge pull request #1503 from consul/budget-name

changes budget name max length
This commit is contained in:
Raimond Garcia
2017-04-27 09:20:07 -07:00
committed by GitHub
3 changed files with 15 additions and 2 deletions

View File

@@ -35,6 +35,10 @@ class Budget < ActiveRecord::Base
2000
end
def self.title_max_length
80
end
def accepting?
phase == "accepting"
end

View File

@@ -0,0 +1,9 @@
class ChangeBudgetName < ActiveRecord::Migration
def up
change_column :budgets, :name, :string, limit: 80
end
def down
change_column :budgets, :name, :string
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: 20170324101716) do
ActiveRecord::Schema.define(version: 20170427145845) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -161,7 +161,7 @@ ActiveRecord::Schema.define(version: 20170324101716) do
add_index "budget_valuator_assignments", ["investment_id"], name: "index_budget_valuator_assignments_on_investment_id", using: :btree
create_table "budgets", force: :cascade do |t|
t.string "name", limit: 30
t.string "name", limit: 80
t.string "currency_symbol", limit: 10
t.string "phase", limit: 40, default: "accepting"
t.datetime "created_at", null: false