Sha256: 14bb5039417d97282ad3a75f7790607de9cd30fdecca66f014191e2a2062f20a

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 Bytes

Contents

class ScaptimonyArfReportsController < ApplicationController
  include Foreman::Controller::AutoCompleteSearch

  before_filter :find_by_id, :only => [:show, :parse, :destroy]

  def model_of_controller
    ::Scaptimony::ArfReport
  end

  def index
    @arf_reports = resource_base.includes(:arf_report_breakdown, :asset)
      .search_for(params[:search], :order => params[:order])
      .paginate(:page => params[:page], :per_page => params[:per_page])
  end

  def show
  end

  def parse
    self.response_body = @arf_report.to_html
  end

  def destroy
    if @arf_report.destroy
      process_success
    else
      process_error
    end
  end

  def find_by_id
    @arf_report = resource_base.find(params[:id])
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_openscap-0.4.3 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.4.2 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.4.1 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.3.4 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.4.0 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.3.3 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.3.2 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.3.1 app/controllers/scaptimony_arf_reports_controller.rb
foreman_openscap-0.3.0 app/controllers/scaptimony_arf_reports_controller.rb