Merge pull request #1503 from consul/budget-name
changes budget name max length
This commit is contained in:
@@ -35,6 +35,10 @@ class Budget < ActiveRecord::Base
|
||||
2000
|
||||
end
|
||||
|
||||
def self.title_max_length
|
||||
80
|
||||
end
|
||||
|
||||
def accepting?
|
||||
phase == "accepting"
|
||||
end
|
||||
|
||||
9
db/migrate/20170427145845_change_budget_name.rb
Normal file
9
db/migrate/20170427145845_change_budget_name.rb
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user