Class: Flms::UsersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/flms/users_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#with_format

Instance Method Details

#createObject



16
17
18
19
20
21
22
23
# File 'app/controllers/flms/users_controller.rb', line 16

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

#destroyObject



25
26
27
28
29
# File 'app/controllers/flms/users_controller.rb', line 25

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

#indexObject



8
9
10
# File 'app/controllers/flms/users_controller.rb', line 8

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

#newObject



12
13
14
# File 'app/controllers/flms/users_controller.rb', line 12

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