daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Jan 18th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Api::V1::BillingRatesController < ApplicationController
  2.  
  3.   def index
  4.     @billing_rates = []
  5.     # => A user has one or more billing. So...
  6.     User.all.each do |user|
  7.       user.billing_rates.each do |billing|
  8.         @billing_rates << { user.id => [billing: billing, matter: billing.matter] }
  9.       end
  10.     end
  11.  
  12.     render json: { data: @billing_rates }
  13.   end
  14.  
  15. 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