daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jan 18th, 2018 53 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
Top