daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. before_save :update_price
  2.  
  3.   def update_price
  4.     self.price_per_minute_2 = self.price_per_minute - self.default_connection_charge if self.price_per_minute
  5.   end
  6.  
  7.   # Registry.default_connection_fee == 0.2
  8.   def default_connection_charge
  9.     @default_connection_charge ||= self.user.connection_charge.to_s.to_d + Registry.default_connection_fee.to_s.to_d
  10.   end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top