Commit a0ad30af

mo khan <mo@mokhan.ca>
2014-07-06 03:35:25
remove description from create command because we do not add one until we edit the cake.
1 parent 967db38
Changed files (2)
app
models
services
app/models/user.rb
@@ -62,8 +62,8 @@ class User < ActiveRecord::Base
     favorites.includes(:creation).map {|f| f.creation }
   end
 
-  def create_cake(name:, description: nil, category:)
-    creations.create(name: name, story: description, category_id: category.id)
+  def create_cake(name:, category:)
+    creations.create(name: name, category_id: category.id)
   end
 
   class << self
app/services/application/create_cake_command.rb
@@ -6,7 +6,7 @@ class CreateCakeCommand
   end
 
   def run(attributes, tags)
-    cake = @current_user.create_cake(name: attributes[:name], description: attributes[:story], category: Category.find(attributes[:category_id]))
+    cake = @current_user.create_cake(name: attributes[:name], category: Category.find(attributes[:category_id]))
     @current_user.tag(cake, with: tags, on: :tags)
 
     if cake.save