Skip to content

Commit 5856865

Browse files
committed
Add genre field to universe
1 parent a7a537a commit 5856865

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

app/controllers/universes_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def content_params
88
def content_param_list
99
[
1010
:user_id,
11-
:name, :description,
11+
:name, :description, :genre,
1212
:laws_of_physics, :magic_system, :technologies,
1313
:history,
1414
:privacy,

config/attributes/universe.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
:label: Name
77
- :name: description
88
:label: Description
9+
- :name: genre
10+
:label: Genre
911
:history:
1012
:label: History
1113
:icon: book
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddGenreToUniverse < ActiveRecord::Migration
2+
def change
3+
add_column :universes, :genre, :string
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended that you check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(version: 20170326164002) do
14+
ActiveRecord::Schema.define(version: 20170326170148) do
1515

1616
create_table "archenemyships", force: :cascade do |t|
1717
t.integer "user_id"
@@ -678,6 +678,7 @@
678678
t.string "laws_of_physics"
679679
t.string "magic_system"
680680
t.string "technologies"
681+
t.string "genre"
681682
end
682683

683684
create_table "users", force: :cascade do |t|

0 commit comments

Comments
 (0)