Class: CompassAeInstance
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CompassAeInstance
- Defined in:
- app/models/compass_ae_instance.rb
Instance Method Summary collapse
- #get_guid ⇒ Object
- #installed_engines ⇒ Object
-
#set_guid(guid) ⇒ Object
helpers for guid.
- #setup_guid ⇒ Object
Instance Method Details
#get_guid ⇒ Object
28 29 30 |
# File 'app/models/compass_ae_instance.rb', line 28 def get_guid self.guid end |
#installed_engines ⇒ Object
15 16 17 18 19 20 |
# File 'app/models/compass_ae_instance.rb', line 15 def installed_engines Rails.application.config.erp_base_erp_svcs.compass_ae_engines.map do |compass_ae_engine| klass_name = compass_ae_engine.railtie_name.camelize {:name => klass_name, :version => ("#{klass_name}::VERSION::STRING".constantize rescue 'N/A')} end end |
#set_guid(guid) ⇒ Object
helpers for guid
23 24 25 26 |
# File 'app/models/compass_ae_instance.rb', line 23 def set_guid(guid) self.guid = guid self.save end |
#setup_guid ⇒ Object
32 33 34 35 36 |
# File 'app/models/compass_ae_instance.rb', line 32 def setup_guid guid = Digest::SHA1.hexdigest(Time.now.to_s + rand(10000).to_s) set_guid(guid) guid end |