Sha256: a2254a3c965bc4cc220f7dde26d01f4b8ba90d2dab638f406349a51fc781e850

Contents?: true

Size: 333 Bytes

Versions: 6

Compression:

Stored size: 333 Bytes

Contents

class RespondWithUsersController < ApplicationController
  
  respond_to :json, :xml
  
  def index
    @users = User.all
    respond_with @users, :api_template => params[:api_template].to_sym
  end
  
  def show
    @user = User.find(params[:id])
    respond_with @user, :api_template => params[:api_template].to_sym
  end  
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
acts_as_api-0.3.5 spec/rails_app/app/controllers/respond_with_users_controller.rb
acts_as_api-0.3.4 spec/rails_app/app/controllers/respond_with_users_controller.rb
acts_as_api-0.3.3 spec/rails_app/app/controllers/respond_with_users_controller.rb
acts_as_api-0.3.2 spec/rails_app/app/controllers/respond_with_users_controller.rb
acts_as_api-0.3.1 spec/rails_app/app/controllers/respond_with_users_controller.rb
acts_as_api-0.3.0 spec/rails_app/app/controllers/respond_with_users_controller.rb