Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Subscription < ActiveRecord::Base
- has_many :periodicity, :through => :periodicity_plan_pairing
- belongs_to :user
- attr_accessor :total_charge
- def total_charge
- @periodicities.price * self.length_in_days * self.keyword_num + self.service_charge + self.surcharge
- end
- end
Add Comment
Please, Sign In to add comment