Sha256: 2f02015e55a8c415dfddf4d85f8f6f3b753fb9be16a1686b9ca4f60ad5ca71d4

Contents?: true

Size: 432 Bytes

Versions: 41

Compression:

Stored size: 432 Bytes

Contents

class Mdm::ReportTemplate < ActiveRecord::Base
  #
  # Callbacks
  #

  before_destroy :delete_file

  #
  # Relations
  #

  belongs_to :workspace, :class_name => 'Mdm::Workspace'

  private

  def delete_file
    c = Pro::Client.get rescue nil
    if c
      c.report_template_delete_file(self[:id])
    else
      ::File.unlink(self.path) rescue nil
    end
  end

  ActiveSupport.run_load_hooks(:mdm_report_template, self)
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
metasploit_data_models-0.16.9 app/models/mdm/report_template.rb
metasploit_data_models-0.16.9-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.8 app/models/mdm/report_template.rb
metasploit_data_models-0.16.8-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.7-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.7 app/models/mdm/report_template.rb
metasploit_data_models-0.16.6-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.6 app/models/mdm/report_template.rb
metasploit_data_models-0.16.5-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.5 app/models/mdm/report_template.rb
metasploit_data_models-0.16.4-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.4 app/models/mdm/report_template.rb
metasploit_data_models-0.16.3-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.1-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.1 app/models/mdm/report_template.rb
metasploit_data_models-0.16.0-java app/models/mdm/report_template.rb
metasploit_data_models-0.16.0 app/models/mdm/report_template.rb
metasploit_data_models-0.15.2-java app/models/mdm/report_template.rb
metasploit_data_models-0.15.2 app/models/mdm/report_template.rb
metasploit_data_models-0.15.1-java app/models/mdm/report_template.rb