Sha256: d8bbbac541ba979668e90b07d0c22ea1cd6f367b073ea20332696c58fd5c71cb

Contents?: true

Size: 594 Bytes

Versions: 5

Compression:

Stored size: 594 Bytes

Contents

require_dependency "flms/application_controller"

module Flms
  class UsersController < ApplicationController
    before_filter :authenticate_user!
    layout 'flms/admin'

    def index
      @users = Flms::User.all
    end

    def new
      @user = Flms::User.new
    end

    def create
      @user = Flms::User.new params[:user]
      if @user.save
        redirect_to users_path, notice: 'User created.'
      else
        render action: "new"
      end
    end

    def destroy
      @user = Flms::User.find params[:id]
      @user.destroy
      redirect_to users_path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flms-0.9.0 app/controllers/flms/users_controller.rb
flms-0.1.0 app/controllers/flms/users_controller.rb
flms-0.0.3 app/controllers/flms/users_controller.rb
flms-0.0.2 app/controllers/flms/users_controller.rb
flms-0.0.1 app/controllers/flms/users_controller.rb