Sha256: c57bcb74f3a1b0ec5ba1544f8bd76b62a47ed89de4c53cac01c2c67b1b8cdb73

Contents?: true

Size: 795 Bytes

Versions: 3

Compression:

Stored size: 795 Bytes

Contents

class DynamicFormDocument < ActiveRecord::Base
  attr_protected :created_at, :updated_at

  belongs_to :dynamic_form_model

  acts_as_dynamic_form_model
  has_file_assets
  has_dynamic_forms
	has_dynamic_data
  acts_as_commentable

  # declare a subclass
  # pass in name of subclass
  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

  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
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
erp_forms-3.1.2 app/models/dynamic_form_document.rb
erp_forms-3.1.1 app/models/dynamic_form_document.rb
erp_forms-3.1.0 app/models/dynamic_form_document.rb