Commit b582713c

mo khan <mo@mokhan.ca>
2014-05-17 00:17:03
only publish to twitter if the cake is safe for children.
1 parent 24bfb43
Changed files (1)
app
app/models/creation.rb
@@ -39,8 +39,7 @@ class Creation < ActiveRecord::Base
   end
 
   def publish_message_with(publisher)
-    message = "#{name} By #{user.name} on https://www.cakeside.com/creations/#{to_param}!"
-    publisher.update(message)
+    publisher.update("#{name} By #{user.name} on https://www.cakeside.com/creations/#{to_param}!") if is_safe_for_children?
   end
 
   class << self