Add slug string column to Budget, Budget::Heading and Budget::Group

Why:

* We're still using id's on routes and other parts of the app, using slugs are more friendly and nice

How:

* Just a migration with a slug column with string type
This commit is contained in:
Bertocq
2017-07-04 12:55:36 +02:00
parent 9f38192e13
commit eb9d5b9b84
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
class AddSlugsToBudgetHeadingGroup < ActiveRecord::Migration
def change
add_column :budgets, :slug, :string
add_column :budget_groups, :slug, :string
add_column :budget_headings, :slug, :string
end
end