Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove deprecation warnings from app.rb

  • Loading branch information...
commit ea5b2ab9682230cfa4ac06d884642614b1c4a1c3 1 parent cd2aa13
@blakefrost authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/apn_on_rails/app/models/apn/app.rb
View
4 lib/apn_on_rails/app/models/apn/app.rb
@@ -8,7 +8,7 @@ class APN::App < APN::Base
has_many :unsent_group_notifications, :through => :groups
def cert
- (RAILS_ENV == 'production' ? apn_prod_cert : apn_dev_cert)
+ (Rails.env.production?? apn_prod_cert : apn_dev_cert)
end
# Opens a connection to the Apple APN server and attempts to batch deliver
@@ -35,7 +35,7 @@ def self.send_notifications
end
def self.send_notifications_for_certs
- cert_column = (RAILS_ENV == 'production' ? 'apn_prod_cert' : 'apn_dev_cert')
+ cert_column = (Rails.env.production?? 'apn_prod_cert' : 'apn_dev_cert')
apps = APN::App.all(
:conditions => "apn_apps.#{cert_column} is not null and apn_notifications.sent_at is null",
:joins => { :devices => :notifications }
Please sign in to comment.
Something went wrong with that request. Please try again.