Sha256: d10ca29fb898f314d900c6441e6592dad534ddc058dbba23d6743f72114929be

Contents?: true

Size: 852 Bytes

Versions: 5

Compression:

Stored size: 852 Bytes

Contents

class UsersController < ApplicationController
  
  respond_to :html
  
  # GET /users
  def index
    @users = User.all
    
    respond_with(@users)
  end
  
  # GET /users/:id
  def show
    @user = User.find(params[:id])
    
    respond_with(@user)
  end
  
  # GET /users/new
  def new
    @user = User.new
    
    respond_with(@user)
  end
  
  # GET /users/:id/edit
  def edit
    @user = User.find(params[:id])
    
    respond_with(@user)
  end
  
  # POST /users
  def create
    @user = User.create(params[:user])
    
    respond_with(@user)
  end
  
  # PUT /users/:id
  def update
    @user = User.find(params[:id])
    @user.attributes = params[:user]
    @user.save
    
    respond_with(@user)
  end
  
  # DELETE /users/:id
  def destroy
    @user = User.find(params[:id])
    @user.destroy
    
    respond_with(@user)
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
serializer-0.0.9 test/dummy/app/controllers/users_controller.rb
serializer-0.0.8 test/dummy/app/controllers/users_controller.rb
serializer-0.0.6 test/dummy/app/controllers/users_controller.rb
serializer-0.0.5 test/dummy/app/controllers/users_controller.rb
serializer-0.0.4 test/dummy/app/controllers/users_controller.rb