Sha256: 4bec56056a0cbc2f2b1771be5a010645ff7bb2d3f7bb8adfbf98220eaed45d6d

Contents?: true

Size: 424 Bytes

Versions: 10

Compression:

Stored size: 424 Bytes

Contents

class PaymentsController < ApplicationController

  include Restfulie::Server::ActionController::Base
  
  respond_to :xml, :json
  
  def create
    @payment = Basket.find(params[:basket_id]).payments.create(params[:payment])
    render :text => "", :status => 201, :location => basket_payment_url(@payment.basket, @payment)
  end
  
  def show
    @payment = Payment.find(params[:id])
    respond_with @payment
  end

end

Version data entries

10 entries across 5 versions & 2 rubygems

Version Path
restfulie-nosqlite-1.0.4 full-examples/rest_from_scratch/part_2/app/controllers/payments_controller.rb
restfulie-nosqlite-1.0.4 full-examples/rest_from_scratch/part_3/app/controllers/payments_controller.rb
restfulie-1.1.1 full-examples/rest_from_scratch/part_3/app/controllers/payments_controller.rb
restfulie-1.1.1 full-examples/rest_from_scratch/part_2/app/controllers/payments_controller.rb
restfulie-1.1.0 full-examples/rest_from_scratch/part_2/app/controllers/payments_controller.rb
restfulie-1.1.0 full-examples/rest_from_scratch/part_3/app/controllers/payments_controller.rb
restfulie-nosqlite-1.0.3 full-examples/rest_from_scratch/part_2/app/controllers/payments_controller.rb
restfulie-nosqlite-1.0.3 full-examples/rest_from_scratch/part_3/app/controllers/payments_controller.rb
restfulie-1.0.3 full-examples/rest_from_scratch/part_3/app/controllers/payments_controller.rb
restfulie-1.0.3 full-examples/rest_from_scratch/part_2/app/controllers/payments_controller.rb