Skip to content

Instantly share code, notes, and snippets.

@mezis
Created August 31, 2012 08:10
Show Gist options
  • Save mezis/3550134 to your computer and use it in GitHub Desktop.
Save mezis/3550134 to your computer and use it in GitHub Desktop.
fix
diff --git a/app/models/booking/messaging_trait.rb b/app/models/booking/messaging_trait.rb
index 7bec914..355cc0f 100644
--- a/app/models/booking/messaging_trait.rb
+++ b/app/models/booking/messaging_trait.rb
@@ -82,7 +82,7 @@ module Booking::MessagingTrait
self.host_conversation.all_messages.detect{|m| m.is_a?(Message::WithGuestBooking)}
guest_message = self.tenant_info_sheet.andand.message
- if guest_message && !created_already
+ if guest_message.present? && !created_already
Message::WithGuestBooking.create!({
:property => property,
:sender => user,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment