Adding payment method
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class DeliveryDestination < ActiveRecord::Base
|
||||
class DeliveryDestination < ActiveRecord::Base
|
||||
has_one :cart
|
||||
belongs_to :user
|
||||
|
||||
@@ -11,4 +11,17 @@ class DeliveryDestination < ActiveRecord::Base
|
||||
result = DeliveryDestination.create!(attributes)
|
||||
return result
|
||||
end
|
||||
|
||||
def get_payment_string
|
||||
case self.payment_method
|
||||
when 'cash_on_delivery'
|
||||
'Pouzecem'
|
||||
when 'paypal'
|
||||
'Paypal'
|
||||
when 'pikpay'
|
||||
'Pikpay'
|
||||
else
|
||||
'Nepoznato'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user