Sha256: e454aa83364d74f52dec86d057deec5edb6a06c6c481d4bab80186c8b1055e02

Contents?: true

Size: 1.18 KB

Versions: 21

Compression:

Stored size: 1.18 KB

Contents

class AddNewContactWidgets
  
  def self.up
    crm_app = OrganizerApplication.find_by_internal_identifier('crm')
     
    unless crm_app.nil?
      Widget.find_by_internal_identifier('party_contact_management').destroy

      phone_number_managementt_widget = ::Widget.create(     
        :description => 'Phone Number Management',
        :icon => 'icon-grid',     
        :xtype => 'phonenumbergrid',
        :internal_identifier => 'phone_number_management'
      )

      email_address_management_widget = ::Widget.create(
        :description => 'Email Address Management',
        :icon => 'icon-grid',
        :xtype => 'emailaddressgrid',
        :internal_identifier => 'email_address_management'
      )

      postal_address_management_widget = ::Widget.create(
        :description => 'Postal Address Management',
        :icon => 'icon-grid',
        :xtype => 'postaladdressgrid',
        :internal_identifier => 'postal_address_management'
      )

      crm_app.widgets << phone_number_managementt_widget
      crm_app.widgets << email_address_management_widget
      crm_app.widgets << postal_address_management_widget
      crm_app.save

    end
  end
  
  def self.down
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

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