This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EventsController < APIController | |
| # GET /events.xml | |
| def index | |
| @events = current_user.events.one_per_user.non_blocked(current_user.id) | |
| if client_build_number < 171 | |
| @events = @events.where("event_type = 'create'") | |
| end | |
| @events = @events.order("max(events.created_at) DESC").limit(25) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Processing by EventsController#index as XML | |
| User: Michael R | |
| User-Agent: Mapchat 1.2.8 rev:197 (iPad; iOS 11.2.5; en_US) | |
| User: Michael R | |
| User-Agent: Mapchat 1.2.8 rev:197 (iPad; iOS 11.2.5; en_US) | |
| [paperclip] Saving attachments. | |
| Completed 200 OK in 15ms (ActiveRecord: 4.6ms) | |
| nil can't be coerced into Float | |
| ["/var/www/chatio/shared/bundle/ruby/1.9.1/gems/geokit-1.11.0/lib/geokit/mappable.rb:58:in `-'", "/var/www/chatio/shared/bundle/ruby/1.9.1/gems/geokit-1.11.0/lib/geokit/mappable.rb:58:in `distance_between_flat'", "/var/www/chatio/shared/bundle/ruby/1.9.1/gems/geokit-1.11.0/lib/geokit/mappable.rb:44:in `distance_between'", "/var/www/chatio/shared/bundle/ruby/1.9.1/gems/geokit-1.11.0/lib/geokit/mappable.rb:213:in `distance_to'", "/var/www/chatio/releases/20180306231328/app/models/event.rb:74:in `distance'", "/var/www/chatio/shared/bundle/ruby/1.9.1/gems/acts_as_api-0.4.1/lib/acts_as_api/api_template.rb:120:in `process_value'", "/var/www/chatio/shared/bundle/ruby/1.9.1/gems/acts_as_api-0.4.1/lib/acts_as_api/api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma mark - Auth | |
| - (void)updateNotifications:(NSNumber*)favorites messages:(NSNumber*)messages created:(NSNumber*)created { | |
| if (!favorites && !messages && !created) { return; } | |
| if (![NSThread isMainThread]) { | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| [self updateNotifications:favorites messages:messages created:created]; | |
| }); |
OlderNewer