Sha256: 02e66e22997d40905783bf02f4d887e13cef1e203c7d5f8520e7bdf69df89c2a
Contents?: true
Size: 517 Bytes
Versions: 6
Compression:
Stored size: 517 Bytes
Contents
class FabulatorLibrary < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name belongs_to :updated_by, :class_name => 'User' belongs_to :created_by, :class_name => 'User' serialize :compiled_xml before_save :compile_xml def compile_xml lib = Fabulator::Lib::Lib.new begin lib.compile_xml(self.xml) lib.register_library rescue => e # add error Rails.logger.info("Error compiling library: #{e}") end self.compiled_xml = lib end end
Version data entries
6 entries across 6 versions & 1 rubygems