Class: Iconly::ProjectIconsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/iconly/project_icons_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



7
8
9
10
# File 'app/controllers/iconly/project_icons_controller.rb', line 7

def create
  @project.project_icons.create(icon_id: params[:icon_id])
  head :no_content
end

#destroyObject



12
13
14
15
16
# File 'app/controllers/iconly/project_icons_controller.rb', line 12

def destroy
  project_icon = @project.project_icons.find_by(icon_id: params[:id])
  project_icon.destroy if project_icon
  head :no_content
end