# class UserStatusesController

### Public Instance Methods

create() click to toggle source

POST /user_statuses POST /user_statuses.json

    # File app/controllers/user_statuses_controller.rb, line 42
    def create
      @user_status = UserStatus.new(params[:user_status])

      respond_to do |format|
        if @user_status.save
          format.html { redirect_to @user_status, notice: 'User status was successfully created.' }
          format.json { render json: @user_status, status: :created, location: @user_status }
        else
          format.html { render action: "new" }
          format.json { render json: @user_status.errors, status: :unprocessable_entity }
        end
      end
    end

destroy() click to toggle source

DELETE /user_statuses/1 DELETE /user_statuses/1.json

    # File app/controllers/user_statuses_controller.rb, line 74
    def destroy
      @user_status = UserStatus.find(params[:id])
      @user_status.destroy

      respond_to do |format|
        format.html { redirect_to user_statuses_url }
        format.json { head :no_content }
      end
    end

edit() click to toggle source

GET /user_statuses/1/edit

    # File app/controllers/user_statuses_controller.rb, line 36
    def edit
      @user_status = UserStatus.find(params[:id])
    end

index() click to toggle source

GET /user_statuses GET /user_statuses.json

    # File app/controllers/user_statuses_controller.rb, line 4
    def index
      @user_statuses = UserStatus.all

      respond_to do |format|
        format.html # index.html.erb

        format.json { render json: @user_statuses }
      end
    end

new() click to toggle source

GET /user_statuses/new GET /user_statuses/new.json

    # File app/controllers/user_statuses_controller.rb, line 26
    def new
      @user_status = UserStatus.new

      respond_to do |format|
        format.html # new.html.erb

        format.json { render json: @user_status }
      end
    end

show() click to toggle source

GET /user_statuses/1 GET /user_statuses/1.json

    # File app/controllers/user_statuses_controller.rb, line 15
    def show
      @user_status = UserStatus.find(params[:id])

      respond_to do |format|
        format.html # show.html.erb

        format.json { render json: @user_status }
      end
    end

update() click to toggle source

PUT /user_statuses/1 PUT /user_statuses/1.json

    # File app/controllers/user_statuses_controller.rb, line 58
    def update
      @user_status = UserStatus.find(params[:id])

      respond_to do |format|
        if @user_status.update_attributes(params[:user_status])
          format.html { redirect_to @user_status, notice: 'User status was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit" }
          format.json { render json: @user_status.errors, status: :unprocessable_entity }
        end
      end
    end