Guest User

Untitled

a guest
Oct 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. def index
  2. respond_to do |format|
  3. format.json {
  4. render reservation_delivery_response(:json)
  5. }
  6. format.xml {
  7. render reservation_delivery_response(:xml)
  8. }
  9. end
  10. end
  11.  
  12. private
  13. def reservation_delivery_response(arg)
  14. @reservations = CrsReservation.reservation_delivery(params)
  15. if @reservations
  16. {arg => @reservations}
  17. else
  18. {:text => 'You are not permitted to view this location.'}
  19. end
  20. end
Add Comment
Please, Sign In to add comment