Class: DynamicFormDocument

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/dynamic_form_document.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.declare(klass_name) ⇒ Object

declare a subclass pass in name of subclass


13
14
15
16
# File 'app/models/dynamic_form_document.rb', line 13

def self.declare(klass_name)    
  Object.send(:remove_const, klass_name) if Object.const_defined?(klass_name) and !Rails.configuration.cache_classes
  Object.const_set(klass_name, Class.new(DynamicFormDocument)) unless Object.const_defined?(klass_name)
end

Instance Method Details

#send_emailObject


18
19
20
21
22
23
24
25
# File 'app/models/dynamic_form_document.rb', line 18

def send_email
  begin
    WebsiteInquiryMailer.inquiry(self).deliver
  rescue Exception => e
    system_user = Party.find_by_description('Compass AE')
    AuditLog.custom_application_log_message(system_user, e)
  end
end