Sha256: c0aca1f0c47777104b58001a3f231d81ee7c7d661f8f0dbbbc5b19e5455692f4

Contents?: true

Size: 704 Bytes

Versions: 3

Compression:

Stored size: 704 Bytes

Contents

class UpdateContactFormValidation
  
  def self.up
    fields = []

    fields << DynamicFormField.textfield({:fieldLabel => 'First Name', :name => 'first_name', :width => '200' })
    fields << DynamicFormField.textfield({:fieldLabel => 'Last Name', :name => 'last_name', :width => '200' })
    fields << DynamicFormField.email({:fieldLabel => 'Email', :name => 'email', :width => '200' })
    fields << DynamicFormField.textarea({:fieldLabel => 'Message', :name => 'message', :width => '200' })    
    
    d = DynamicForm.find_by_internal_identifier('contact_us')
    unless d.nil?
      d.definition = fields.to_json
      d.save    
    end    
  end
  
  def self.down
    # do nothing
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
erp_forms-2.0.2 db/data_migrations/20110822170240_update_contact_form_validation.rb
erp_forms-2.0.1 db/data_migrations/20110822170240_update_contact_form_validation.rb
erp_forms-2.0.0 db/data_migrations/20110822170240_update_contact_form_validation.rb