Class: Dradis::Plugins::Calculators::CVSS::IssuesController
- Inherits:
-
IssuesController
- Object
- IssuesController
- Dradis::Plugins::Calculators::CVSS::IssuesController
- Defined in:
- app/controllers/dradis/plugins/calculators/cvss/issues_controller.rb
Overview
Does it matter that we’re inheriting from the no-frills controller?
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
7 |
# File 'app/controllers/dradis/plugins/calculators/cvss/issues_controller.rb', line 7 def edit; end |
#update ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/dradis/plugins/calculators/cvss/issues_controller.rb', line 9 def update cvss_fields = Hash[ *params[:cvss_fields].scan(FieldParser::FIELDS_REGEX).flatten.map(&:strip) ] cvss_fields.each do |name, value| @issue.set_field(name, value) end if @issue.save redirect_to main_app.project_issue_path(current_project, @issue), notice: 'CVSS fields updated.' else render :edit end end |