Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def index
- respond_to do |format|
- format.json {
- render reservation_delivery_response(:json)
- }
- format.xml {
- render reservation_delivery_response(:xml)
- }
- end
- end
- private
- def reservation_delivery_response(arg)
- @reservations = CrsReservation.reservation_delivery(params)
- if @reservations
- {arg => @reservations}
- else
- {:text => 'You are not permitted to view this location.'}
- end
- end
Add Comment
Please, Sign In to add comment