Module: IssuableActions

Extended by:
ActiveSupport::Concern
Included in:
Projects::IssuesController, Projects::MergeRequestsController
Defined in:
app/controllers/concerns/issuable_actions.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject


8
9
10
11
12
13
14
# File 'app/controllers/concerns/issuable_actions.rb', line 8

def destroy
  issuable.destroy

  name = issuable.class.name.titleize.downcase
  flash[:notice] = "The #{name} was successfully deleted."
  redirect_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable.class])
end