Class: Admin::ResearchToolsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/research_tools_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



21
22
23
24
# File 'app/controllers/admin/research_tools_controller.rb', line 21

def create
  @research_tool.update(research_tool_params)
  respond_with(@research_tool, location: -> { admin_research_tools_path })
end

#destroyObject



31
32
33
34
# File 'app/controllers/admin/research_tools_controller.rb', line 31

def destroy
  @research_tool.destroy
  respond_with(@research_tool)
end

#editObject



17
18
19
# File 'app/controllers/admin/research_tools_controller.rb', line 17

def edit
  respond_with(@research_tool)
end

#indexObject



8
9
10
11
# File 'app/controllers/admin/research_tools_controller.rb', line 8

def index
  @research_tools = ResearchTool.all
  respond_with(@research_tools)
end

#newObject



13
14
15
# File 'app/controllers/admin/research_tools_controller.rb', line 13

def new
  respond_with(@research_tool)
end

#updateObject



26
27
28
29
# File 'app/controllers/admin/research_tools_controller.rb', line 26

def update
  @research_tool.update(research_tool_params)
  respond_with(@research_tool, location: -> { admin_research_tools_path })
end