Permalink
Browse files

fixed nil status nomethoderror

  • Loading branch information...
1 parent 6ec33a5 commit 6d28f0ad8274712b884a43dad3842ebd93ff95d9 @jamesmacaulay committed Jul 9, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 backfire.rb
View
2 backfire.rb
@@ -71,7 +71,7 @@ def self.update_campfire
user_statuses, user_entries = user_array.last.partition {|item| item.is_a? Status}
status = user_statuses.first
user_entries = user_entries.sort {|a,b| b.updated_at <=> a.updated_at }
- latest_updated_at = status.updated_at if status.updated_at > latest_updated_at
+ latest_updated_at = status.updated_at if status.updated_at and status.updated_at > latest_updated_at
latest_updated_at = user_entries.first.updated_at if user_entries.first and user_entries.first.updated_at > latest_updated_at
unless user_entries.empty? and (self.last_updated_at ? status.updated_at < self.last_updated_at : true)
update << "\n#{user.name}: #{status.message unless user_statuses.empty?}\n"

0 comments on commit 6d28f0a

Please sign in to comment.