Guest User

Untitled

a guest
May 27th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class Subscription < ActiveRecord::Base
  2. has_many :periodicity, :through => :periodicity_plan_pairing
  3. belongs_to :user
  4. attr_accessor :total_charge
  5. def total_charge
  6. @periodicities.price * self.length_in_days * self.keyword_num + self.service_charge + self.surcharge
  7. end
  8.  
  9. end
Add Comment
Please, Sign In to add comment