Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Allow same app key in multi environments. #67

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/rapns/app.rb
Expand Up @@ -4,9 +4,9 @@ class App < ActiveRecord::Base

attr_accessible :key, :environment, :certificate, :password, :connections

validates :key, :presence => true, :uniqueness => true
validates :key, :presence => true, :uniqueness => { :scope => :environment }
validates :environment, :presence => true, :inclusion => { :in => %w(development production) }
validates :certificate, :presence => true
validates_numericality_of :connections, :greater_than => 0, :only_integer => true
end
end
end