Sha256: 5eff936f744bf5aa221dcd67bf2669dbac29d787d1995bb705cad6099a215651

Contents?: true

Size: 1.01 KB

Versions: 34

Compression:

Stored size: 1.01 KB

Contents

class AddFileManagerApplication
  
  def self.up
    if DesktopApplication.find_by_internal_identifier('file_manager').nil?
      file_manager_app = DesktopApplication.create(
        :description => 'File Manager',
        :icon => 'icon-folders',
        :javascript_class_name => 'Compass.ErpApp.Desktop.Applications.FileManager',
        :internal_identifier => 'file_manager',
        :shortcut_id => 'file_manager-win'
      )

      file_manager_app.preference_types << PreferenceType.iid('desktop_shortcut')
      file_manager_app.preference_types << PreferenceType.iid('autoload_application')
      file_manager_app.save
    
      admin_user = User.find_by_username('admin')
      admin_user.desktop.applications << file_manager_app
      admin_user.save
    
      truenorth_user = User.find_by_username('truenorth')
      truenorth_user.desktop.applications << file_manager_app
      truenorth_user.save
    end
  end
  
  def self.down
    DesktopApplication.find_by_internal_identifier('file_manager').destroy
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
erp_app-4.0.0 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.16 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.15 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.14 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.13 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.12 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.11 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.10 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.9 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.8 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.7 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.6 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.5 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.4 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.3 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.2 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.0.16 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.0.15 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.1 db/data_migrations/20110817160743_add_file_manager_application.rb
erp_app-3.1.0 db/data_migrations/20110817160743_add_file_manager_application.rb