Sha256: d35e376cad9820fb8763e546af685ad4b2d7edae684d168c9ffba6facad3c069

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 Bytes

Contents

class UsersController < ApplicationController

  before_filter :require_login

  load_and_authorize_resource

  def index
  end

  def show
  end

  def new
  end

  def edit
  end

  def create
    @user = User.new(params[:user])

    if @user.save
      redirect_to @user, notice: 'User was successfully created.'
    else
      render action: "new"
    end
  end

  def update
    if @user.update_attributes(params[:user])
      redirect_to @user, notice: 'User was successfully updated.'
    else
      render action: "edit"
    end
  end

  def destroy
    @user.destroy
    redirect_to users_url
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
raygun-0.0.16 app_prototype/app/controllers/users_controller.rb
raygun-0.0.15 app_prototype/app/controllers/users_controller.rb
raygun-0.0.14 app_prototype/app/controllers/users_controller.rb
raygun-0.0.13 app_prototype/app/controllers/users_controller.rb