mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Replace deprecated validates_presence_of
This syntax has been deprecated in Rails 3: https://guides.rubyonrails.org/3_0_release_notes.html#patches-and-deprecations
This commit is contained in:
@@ -9,8 +9,8 @@ class SubscriptionValidator
|
||||
|
||||
attr_reader :subscription
|
||||
|
||||
validates_presence_of :shop, :customer, :schedule, :shipping_method, :payment_method
|
||||
validates_presence_of :bill_address, :ship_address, :begins_at
|
||||
validates :shop, :customer, :schedule, :shipping_method, :payment_method, presence: true
|
||||
validates :bill_address, :ship_address, :begins_at, presence: true
|
||||
validate :shipping_method_allowed?
|
||||
validate :payment_method_allowed?
|
||||
validate :payment_method_type_allowed?
|
||||
|
||||
Reference in New Issue
Block a user