@@ -13,7 +13,7 @@ namespace :cortex do
13
13
creator_id : 1 ,
14
14
contract_id : 1
15
15
} )
16
- media . save
16
+ media . save!
17
17
18
18
puts "Creating Fields..."
19
19
@@ -47,7 +47,7 @@ namespace :cortex do
47
47
media . fields . new ( name : 'Tags' , field_type : 'tag_field_type' )
48
48
media . fields . new ( name : 'Expiration Date' , field_type : 'date_time_field_type' )
49
49
media . fields . new ( name : 'Alt Tag' , field_type : 'text_field_type' )
50
- media . save
50
+ media . save!
51
51
52
52
puts "Creating Wizard Decorators..."
53
53
wizard_hash = {
@@ -116,9 +116,9 @@ namespace :cortex do
116
116
}
117
117
118
118
media_wizard_decorator = Decorator . new ( name : "Wizard" , data : wizard_hash )
119
- media_wizard_decorator . save
119
+ media_wizard_decorator . save!
120
120
121
- ContentableDecorator . create ( {
121
+ ContentableDecorator . create! ( {
122
122
decorator_id : media_wizard_decorator . id ,
123
123
contentable_id : media . id ,
124
124
contentable_type : 'ContentType'
@@ -199,9 +199,9 @@ namespace :cortex do
199
199
}
200
200
201
201
media_index_decorator = Decorator . new ( name : "Index" , data : index_hash )
202
- media_index_decorator . save
202
+ media_index_decorator . save!
203
203
204
- ContentableDecorator . create ( {
204
+ ContentableDecorator . create! ( {
205
205
decorator_id : media_index_decorator . id ,
206
206
contentable_id : media . id ,
207
207
contentable_type : 'ContentType'
0 commit comments