Skip to content
Browse files

Fixed syntax errors and updated helper

  • Loading branch information...
1 parent e215fc5 commit 35380a50a21509180f47875ae9fe4f9bfd54b247 @adahmash adahmash committed Feb 13, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/controllers/events_controller.rb
  2. +1 −1 app/models/event.rb
  3. +1 −1 lib/newscloud/util.rb
View
2 app/controllers/events_controller.rb
@@ -83,7 +83,7 @@ def import_facebook
@fb_events = current_facebook_graph_user.events
@fb_events.delete_if {|x| !x.start_time.nil? and (Time.parse(x.start_time) < Time.now)}
current_events = Event.active.find(:all, :conditions=>["eid IN (?)", @fb_events.collect { |e| e.id }]).collect { |e| e.eid }
- @fb_events.delete_if {|x| current_events.include? x.eid.to_s }
+ @fb_events.delete_if {|x| current_events.include? x.id.to_s }
else
flash[:info] = "You need to connect via Facebook."
redirect_to events_path
View
2 app/models/event.rb
@@ -38,7 +38,7 @@ def self.top
def self.create_from_facebook_event(facebook_event, user)
return nil if not facebook_event.is_a? Mogli::Event
- check = nil Event.find_by_eid(facebook_event.id)
+ check = Event.find_by_eid(facebook_event.id)
if check
return check
else
View
2 lib/newscloud/util.rb
@@ -31,7 +31,7 @@ def current_facebook_user
end
def current_facebook_graph_user
- (current_user and current_user.mogli_user) ? current_user.mogli_user : nil
+ current_user and current_user.mogli_user
end
def logged_in?

0 comments on commit 35380a5

Please sign in to comment.
Something went wrong with that request. Please try again.