Commit 6e291099

mo khan <mo@mokhan.ca>
2014-05-17 02:41:37
publish message to twitter if theres at least one photo and it is not naughty.
1 parent 726d404
Changed files (1)
app
app/models/creation.rb
@@ -39,7 +39,9 @@ class Creation < ActiveRecord::Base
   end
 
   def publish_message_with(publisher)
-    publisher.update("#{name} By #{user.name} on https://www.cakeside.com/creations/#{to_param}!") if is_safe_for_children?
+    if is_safe_for_children? && published?
+      publisher.update("#{name} By #{user.name} on https://www.cakeside.com/creations/#{to_param}!") 
+    end
   end
 
   class << self