Class: NsaPanel::UsersController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/nsa_panel/users_controller.rb', line 5

def index
  @users = NsaPanel.user.all
end

#order_drone_strikeObject



13
14
15
16
17
# File 'app/controllers/nsa_panel/users_controller.rb', line 13

def order_drone_strike
  @user = NsaPanel.user.find(params[:id])

  redirect_to users_path, notice: "Drone strike for #{@user.name} (##{@user.id}) was successfully ordered."
end

#showObject



9
10
11
# File 'app/controllers/nsa_panel/users_controller.rb', line 9

def show
  @user = NsaPanel.user.find(params[:id])
end