fe 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +16 -36
- data/app/assets/javascripts/fe/admin.js +0 -1
- data/app/assets/javascripts/fe/fe.admin.js +40 -16
- data/app/assets/javascripts/fe/fe.common.js +48 -14
- data/app/assets/javascripts/fe/fe.public.js +1 -414
- data/app/assets/javascripts/fe/fe.public.nojquery.js +450 -0
- data/app/assets/javascripts/fe/jquery.validate.pack.js +3 -15
- data/app/assets/stylesheets/360front.css +0 -0
- data/app/assets/stylesheets/fe/fe.screen.css.scss.erb +69 -10
- data/app/controllers/fe/admin/elements_controller.rb +64 -48
- data/app/controllers/fe/admin/email_templates_controller.rb +2 -2
- data/app/controllers/fe/admin/question_pages_controller.rb +1 -1
- data/app/controllers/fe/admin/question_sheets_controller.rb +2 -103
- data/app/controllers/fe/concerns/admin/question_sheets_controller_concern.rb +112 -0
- data/app/controllers/fe/concerns/answer_pages_controller_concern.rb +2 -1
- data/app/controllers/fe/concerns/answer_sheets_controller_concern.rb +1 -1
- data/app/controllers/fe/concerns/application_controller_concern.rb +13 -0
- data/app/controllers/fe/reference_sheets_controller.rb +2 -0
- data/app/controllers/fe/references_controller.rb +1 -0
- data/app/helpers/fe/application_helper.rb +5 -0
- data/app/mailers/fe/notifier.rb +11 -4
- data/app/models/answer_sheet.rb +2 -0
- data/app/models/fe/application.rb +2 -1
- data/app/models/fe/concerns/answer_pages_presenter_concern.rb +10 -1
- data/app/models/fe/concerns/answer_sheet_concern.rb +38 -8
- data/app/models/fe/concerns/choice_field_concern.rb +17 -10
- data/app/models/fe/date_field.rb +1 -1
- data/app/models/fe/element.rb +105 -31
- data/app/models/fe/page.rb +52 -20
- data/app/models/fe/page_element.rb +6 -1
- data/app/models/fe/page_link.rb +6 -3
- data/app/models/fe/person.rb +11 -8
- data/app/models/fe/question.rb +2 -6
- data/app/models/fe/question_grid.rb +1 -1
- data/app/models/fe/question_grid_with_total.rb +15 -0
- data/app/models/fe/question_set.rb +1 -1
- data/app/models/fe/question_sheet.rb +15 -13
- data/app/models/fe/reference_question.rb +0 -10
- data/app/models/fe/reference_sheet.rb +17 -13
- data/app/models/staff.rb +2 -0
- data/app/validators/email_validator.rb +11 -0
- data/app/views/fe/admin/elements/create.js.erb +1 -0
- data/app/views/fe/admin/elements/drop.js.erb +1 -0
- data/app/views/fe/admin/elements/duplicate.js.erb +1 -0
- data/app/views/fe/admin/panels/_advanced_options.html.erb +9 -3
- data/app/views/fe/admin/panels/_common_fields.html.erb +19 -5
- data/app/views/fe/admin/panels/_page.html.erb +1 -1
- data/app/views/fe/admin/panels/_prop_choice_field.html.erb +20 -11
- data/app/views/fe/admin/panels/_prop_element.html.erb +2 -9
- data/app/views/fe/admin/panels/_prop_page.html.erb +8 -3
- data/app/views/fe/admin/panels/_prop_paragraph.html.erb +38 -24
- data/app/views/fe/admin/panels/_prop_section.html.erb +8 -2
- data/app/views/fe/admin/panels/_prop_sheet.html.erb +4 -1
- data/app/views/fe/admin/question_pages/_element.html.erb +11 -1
- data/app/views/fe/answer_pages/_answer_page.html.erb +9 -8
- data/app/views/fe/answer_pages/_element.html.erb +6 -7
- data/app/views/fe/answer_pages/_page_name.html.erb +1 -0
- data/app/views/fe/answer_pages/update.js.erb +3 -3
- data/app/views/fe/answer_sheets/_answer_sheet.html.erb +3 -3
- data/app/views/fe/answer_sheets/_element.html.erb +52 -34
- data/app/views/fe/answer_sheets/_incomplete.html.erb +1 -1
- data/app/views/fe/answer_sheets/_page_link.html.erb +2 -2
- data/app/views/fe/answer_sheets/_pages_list.html.erb +3 -3
- data/app/views/fe/answer_sheets/_submit_to.html.erb +1 -0
- data/app/views/fe/answer_sheets/edit.html.erb +14 -14
- data/app/views/fe/answer_sheets/incomplete.js.erb +3 -0
- data/app/views/fe/answer_sheets/index.html.erb +3 -3
- data/app/views/fe/answer_sheets/show.html.erb +1 -1
- data/app/views/fe/applications/_logout.html.erb +1 -0
- data/app/views/fe/applications/show.html.erb +1 -0
- data/app/views/fe/questions/fe/_acceptance.html.erb +3 -3
- data/app/views/fe/questions/fe/_attachment_field.html.erb +7 -3
- data/app/views/fe/questions/fe/_checkbox_field.html.erb +26 -24
- data/app/views/fe/questions/fe/_date_field.html.erb +1 -2
- data/app/views/fe/questions/fe/_date_field_mmyy.html.erb +2 -2
- data/app/views/fe/questions/fe/_drop_down_field.html.erb +3 -2
- data/app/views/fe/questions/fe/_paragraph.html.erb +1 -1
- data/app/views/fe/questions/fe/_question_grid.html.erb +14 -9
- data/app/views/fe/questions/fe/_question_grid_with_total.html.erb +21 -14
- data/app/views/fe/questions/fe/_questions.html.erb +2 -2
- data/app/views/fe/questions/fe/_radio_button_field.html.erb +12 -11
- data/app/views/fe/questions/fe/_rating.html.erb +9 -8
- data/app/views/fe/questions/fe/_reference_discipler.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_friend.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_parent.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_peer.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_question.html.erb +22 -15
- data/app/views/fe/questions/fe/_reference_roommate.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_spiritual.html.erb +1 -1
- data/app/views/fe/questions/fe/_reference_staff.html.erb +1 -1
- data/app/views/fe/questions/fe/_section.html.erb +1 -1
- data/app/views/fe/questions/fe/_text_area_field.html.erb +10 -3
- data/app/views/fe/questions/fe/_text_field.html.erb +1 -1
- data/app/views/fe/questions/fe/_yes_no_field.erb +3 -3
- data/app/views/fe/reference_pages/_reference.html.erb +11 -11
- data/app/views/fe/reference_pages/edit.html.erb +7 -7
- data/app/views/fe/reference_sheets/done.html.erb +2 -2
- data/app/views/fe/reference_sheets/not_found.html.erb +4 -4
- data/app/views/fe/references/edit.html.erb +6 -6
- data/app/views/fe/references/show.html.erb +7 -7
- data/app/views/fe/references/submit.js.erb +1 -1
- data/app/views/fe/submit_pages/_thankyou.html.erb +1 -1
- data/app/views/fe/submit_pages/edit.html.erb +9 -9
- data/app/views/layouts/fe/_error_messages_for.html.erb +7 -0
- data/app/views/layouts/fe/application.html.erb +1 -1
- data/config/routes.rb +0 -36
- data/db/migrate/20131003044250_create_reference_sheets.rb +1 -0
- data/db/migrate/20140623153424_create_fe_people.rb +1 -1
- data/db/migrate/20140624180246_create_fe_addresses.rb +1 -1
- data/db/migrate/20140624182216_create_fe_phone_numbers.rb +16 -0
- data/db/migrate/20140625160545_create_fe_users.rb +1 -1
- data/db/migrate/20150504221439_add_all_element_ids_to_pages.rb +5 -0
- data/db/migrate/20150713022326_add_locale_columns.rb +9 -0
- data/db/migrate/20150714220730_add_locale_to_answer_sheet.rb +5 -0
- data/db/migrate/20150928085325_change_pages_all_element_ids_to_text.rb +5 -0
- data/db/migrate/20150930191538_add_locale_to_reference_sheets.rb +5 -0
- data/lib/access_key_generator.rb +12 -0
- data/lib/distinct_distinct_patch.rb +20 -0
- data/lib/fe.rb +4 -0
- data/lib/fe/engine.rb +16 -4
- data/lib/fe/version.rb +1 -1
- data/spec/controllers/fe/admin/elements_controller_spec.rb +201 -1
- data/spec/controllers/fe/admin/email_templates_controller_spec.rb +26 -1
- data/spec/controllers/fe/admin/question_pages_controller_spec.rb +8 -1
- data/spec/controllers/fe/admin/question_sheets_controller_spec.rb +48 -1
- data/spec/controllers/fe/answer_pages_controller_spec.rb +73 -1
- data/spec/controllers/fe/answer_sheets_controller_spec.rb +80 -1
- data/spec/controllers/fe/reference_pages_controller.rb +4 -0
- data/spec/controllers/fe/references_controller_spec.rb +4 -0
- data/spec/controllers/fe/submit_pages_controller_spec.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +9 -0
- data/spec/dummy/app/models/application.rb +3 -0
- data/spec/dummy/app/models/person.rb +11 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/config/application.rb +2 -1
- data/spec/dummy/config/database.yml +20 -17
- data/spec/dummy/config/environments/production.rb +1 -5
- data/spec/dummy/config/environments/test.rb +3 -1
- data/spec/dummy/config/initializers/fast_gettext.rb +5 -0
- data/spec/dummy/config/secrets.yml +2 -2
- data/spec/dummy/db/migrate/20141203214017_core.fe_engine.rb +92 -0
- data/spec/dummy/db/migrate/20141203214018_create_reference_sheets.fe_engine.rb +25 -0
- data/spec/dummy/db/migrate/20141203214019_add_element_and_answer_fields.fe_engine.rb +11 -0
- data/spec/dummy/db/migrate/20141203214020_create_email_templates.fe_engine.rb +18 -0
- data/spec/dummy/db/migrate/20141203214021_add_max_lengths.fe_engine.rb +9 -0
- data/spec/dummy/db/migrate/20141203214022_create_join_table.fe_engine.rb +12 -0
- data/spec/dummy/db/migrate/20141203214023_remove_question_id_from_element.fe_engine.rb +10 -0
- data/spec/dummy/db/migrate/20141203214024_create_fe_people.fe_engine.rb +13 -0
- data/spec/dummy/db/migrate/20141203214025_create_fe_addresses.fe_engine.rb +21 -0
- data/{db/migrate/20140624182216_create_create_fe_phone_numbers.rb → spec/dummy/db/migrate/20141203214026_create_create_fe_phone_numbers.fe_engine.rb} +1 -0
- data/spec/dummy/db/migrate/20141203214027_create_fe_users.fe_engine.rb +13 -0
- data/spec/dummy/db/migrate/20141203214028_add_conditional_type_to_elements.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20141203214029_add_conditional_answer_to_elements.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20141203214030_remove_short_value_column.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20141203214031_move_conditional_ids_used_for_choice_field_to_their_own_column.fe_engine.rb +8 -0
- data/spec/dummy/db/migrate/20150123215803_create_users.rb +9 -0
- data/spec/dummy/db/migrate/20150504222619_add_all_element_ids_to_pages.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20150930190001_create_fe_phone_numbers.fe_engine.rb +20 -0
- data/spec/dummy/db/migrate/20150930190002_add_locale_columns.fe_engine.rb +10 -0
- data/spec/dummy/db/migrate/20150930190003_add_locale_to_answer_sheet.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20150930190004_change_pages_all_element_ids_to_text.fe_engine.rb +6 -0
- data/spec/dummy/db/migrate/20150930191756_add_locale_to_reference_sheets.fe_engine.rb +6 -0
- data/spec/dummy/db/schema.rb +50 -20
- data/spec/dummy/log/development.log +5 -0
- data/spec/factories/applications.rb +0 -1
- data/spec/factories/dummy_applications.rb +6 -0
- data/spec/factories/dummy_people.rb +6 -0
- data/spec/factories/dummy_users.rb +6 -0
- data/spec/factories/elements.rb +28 -3
- data/spec/factories/email_templates.rb +5 -0
- data/spec/factories/fe_email_templates.rb +9 -0
- data/spec/factories/fe_people.rb +0 -2
- data/spec/factories/fe_user.rb +6 -0
- data/spec/factories/question_sheet.rb +1 -1
- data/spec/factories/reference_sheets.rb +9 -0
- data/spec/mailers/fe/notifier_spec.rb +39 -0
- data/spec/models/fe/choice_field_spec.rb +20 -0
- data/spec/models/fe/element_spec.rb +185 -0
- data/spec/models/fe/page_spec.rb +112 -0
- data/spec/models/fe/question_sheet_spec.rb +106 -0
- data/spec/models/fe/reference_sheet_spec.rb +20 -0
- data/spec/rails_helper.rb +41 -13
- data/spec/support/choices.xml +6 -0
- metadata +136 -48
- data/app/assets/javascripts/fe/rails.extra.js +0 -6
- data/app/controllers/fe/applications_controller.rb +0 -183
- data/app/controllers/fe/payments_controller.rb +0 -184
- data/app/models/fe/payment.rb +0 -77
- data/app/models/fe/payment_question.rb +0 -22
- data/app/views/fe/admin/panels/_prop_payment_question.html.erb +0 -1
- data/app/views/fe/application/_logout.html.erb +0 -1
- data/app/views/fe/payment_pages/_credit.html.erb +0 -47
- data/app/views/fe/payment_pages/_mail.html.erb +0 -27
- data/app/views/fe/payment_pages/_payment.html.erb +0 -6
- data/app/views/fe/payment_pages/_staff.html.erb +0 -25
- data/app/views/fe/payment_pages/_staff_results.html.erb +0 -17
- data/app/views/fe/payment_pages/edit.html.erb +0 -75
- data/app/views/fe/payment_pages/staff_search.js.erb +0 -2
- data/app/views/fe/payments/_credit.html.erb +0 -47
- data/app/views/fe/payments/_errors.html.erb +0 -1
- data/app/views/fe/payments/_payment.html.erb +0 -13
- data/app/views/fe/payments/_staff.html.erb +0 -21
- data/app/views/fe/payments/_staff_results.html.erb +0 -18
- data/app/views/fe/payments/approve.js.erb +0 -3
- data/app/views/fe/payments/create.js.erb +0 -19
- data/app/views/fe/payments/destroy.js.erb +0 -7
- data/app/views/fe/payments/edit.html.erb +0 -56
- data/app/views/fe/payments/error.js.erb +0 -3
- data/app/views/fe/payments/no_access.html.erb +0 -7
- data/app/views/fe/payments/staff_search.js.erb +0 -1
- data/app/views/fe/payments/update.html.erb +0 -24
- data/app/views/fe/questions/fe/_payment_question.html.erb +0 -70
- data/db/migrate/20140828045339_create_payments.rb +0 -13
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/payments.rb +0 -7
- data/spec/models/fe/payment_question_spec.rb +0 -65
@@ -0,0 +1,13 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20140623153424)
|
2
|
+
class CreateFePeople < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :fe_people do |t|
|
5
|
+
t.string :first_name, limit: 50
|
6
|
+
t.string :last_name, limit: 50
|
7
|
+
t.integer :user_id
|
8
|
+
t.boolean :is_staff
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20140624180246)
|
2
|
+
class CreateFeAddresses < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :fe_addresses do |t|
|
5
|
+
t.datetime :startdate
|
6
|
+
t.datetime :enddate
|
7
|
+
t.string :address1
|
8
|
+
t.string :address2
|
9
|
+
t.string :address3
|
10
|
+
t.string :address4
|
11
|
+
t.string :address_type
|
12
|
+
t.string :city
|
13
|
+
t.string :state
|
14
|
+
t.string :zip
|
15
|
+
t.string :country
|
16
|
+
t.integer :person_id
|
17
|
+
|
18
|
+
t.timestamps
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20140625160545)
|
2
|
+
class CreateFeUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :fe_users do |t|
|
5
|
+
t.integer :user_id
|
6
|
+
t.datetime :last_login
|
7
|
+
t.string :type
|
8
|
+
t.string :role
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20141109154522)
|
2
|
+
class MoveConditionalIdsUsedForChoiceFieldToTheirOwnColumn < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column Fe::Element.table_name, :choice_field_id, :integer
|
5
|
+
Fe::Element.reset_column_information
|
6
|
+
Fe::Element.where(conditional_type: nil).where("conditional_id is not null").update_all("choice_field_id = conditional_id, conditional_id = null")
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20140624182216)
|
2
|
+
class CreateFePhoneNumbers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
begin
|
5
|
+
create_table Fe::PhoneNumber do |t|
|
6
|
+
t.string :number
|
7
|
+
t.string :extensions
|
8
|
+
t.integer :person_id
|
9
|
+
t.string :location
|
10
|
+
t.boolean :primary
|
11
|
+
t.string :txt_to_email
|
12
|
+
t.integer :carrier_id
|
13
|
+
t.datetime :email_updated_at
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
rescue
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This migration comes from fe_engine (originally 20150713022326)
|
2
|
+
class AddLocaleColumns < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column Fe::QuestionSheet.table_name, :languages, :text
|
5
|
+
add_column Fe::Element.table_name, :label_translations, :text
|
6
|
+
add_column Fe::Element.table_name, :tip_translations, :text
|
7
|
+
add_column Fe::Element.table_name, :content_translations, :text
|
8
|
+
add_column Fe::Page.table_name, :label_translations, :text
|
9
|
+
end
|
10
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20150930191756) do
|
15
15
|
|
16
16
|
create_table "create_fe_phone_numbers", force: true do |t|
|
17
17
|
t.string "number"
|
@@ -50,13 +50,12 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
50
50
|
t.datetime "updated_at"
|
51
51
|
end
|
52
52
|
|
53
|
-
add_index "fe_answer_sheet_question_sheets", ["answer_sheet_id", "question_sheet_id"], name: "answer_sheet_question_sheet"
|
53
|
+
add_index "fe_answer_sheet_question_sheets", ["answer_sheet_id", "question_sheet_id"], name: "answer_sheet_question_sheet", using: :btree
|
54
54
|
|
55
55
|
create_table "fe_answers", force: true do |t|
|
56
56
|
t.integer "answer_sheet_id", null: false
|
57
57
|
t.integer "question_id", null: false
|
58
58
|
t.text "value"
|
59
|
-
t.string "short_value"
|
60
59
|
t.integer "attachment_file_size"
|
61
60
|
t.string "attachment_content_type"
|
62
61
|
t.string "attachment_file_name"
|
@@ -65,8 +64,7 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
65
64
|
t.datetime "updated_at"
|
66
65
|
end
|
67
66
|
|
68
|
-
add_index "fe_answers", ["answer_sheet_id", "question_id"], name: "answer_sheet_question"
|
69
|
-
add_index "fe_answers", ["short_value"], name: "index_fe_answers_on_short_value"
|
67
|
+
add_index "fe_answers", ["answer_sheet_id", "question_id"], name: "answer_sheet_question", using: :btree
|
70
68
|
|
71
69
|
create_table "fe_applications", force: true do |t|
|
72
70
|
t.integer "applicant_id"
|
@@ -74,9 +72,10 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
74
72
|
t.datetime "submitted_at"
|
75
73
|
t.datetime "created_at"
|
76
74
|
t.datetime "updated_at"
|
75
|
+
t.string "locale", default: "en"
|
77
76
|
end
|
78
77
|
|
79
|
-
add_index "fe_applications", ["applicant_id"], name: "question_sheet_id"
|
78
|
+
add_index "fe_applications", ["applicant_id"], name: "question_sheet_id", using: :btree
|
80
79
|
|
81
80
|
create_table "fe_conditions", force: true do |t|
|
82
81
|
t.integer "question_sheet_id", null: false
|
@@ -88,10 +87,10 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
88
87
|
t.datetime "updated_at"
|
89
88
|
end
|
90
89
|
|
91
|
-
add_index "fe_conditions", ["question_sheet_id"], name: "index_fe_conditions_on_question_sheet_id"
|
92
|
-
add_index "fe_conditions", ["toggle_id"], name: "index_fe_conditions_on_toggle_id"
|
93
|
-
add_index "fe_conditions", ["toggle_page_id"], name: "index_fe_conditions_on_toggle_page_id"
|
94
|
-
add_index "fe_conditions", ["trigger_id"], name: "index_fe_conditions_on_trigger_id"
|
90
|
+
add_index "fe_conditions", ["question_sheet_id"], name: "index_fe_conditions_on_question_sheet_id", using: :btree
|
91
|
+
add_index "fe_conditions", ["toggle_id"], name: "index_fe_conditions_on_toggle_id", using: :btree
|
92
|
+
add_index "fe_conditions", ["toggle_page_id"], name: "index_fe_conditions_on_toggle_page_id", using: :btree
|
93
|
+
add_index "fe_conditions", ["trigger_id"], name: "index_fe_conditions_on_trigger_id", using: :btree
|
95
94
|
|
96
95
|
create_table "fe_elements", force: true do |t|
|
97
96
|
t.integer "question_grid_id"
|
@@ -120,11 +119,18 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
120
119
|
t.boolean "hide_label", default: false
|
121
120
|
t.boolean "hide_option_labels", default: false
|
122
121
|
t.integer "max_length"
|
122
|
+
t.string "conditional_type"
|
123
|
+
t.text "conditional_answer"
|
124
|
+
t.integer "choice_field_id"
|
125
|
+
t.boolean "share", default: false
|
126
|
+
t.text "label_translations"
|
127
|
+
t.text "tip_translations"
|
128
|
+
t.text "content_translations"
|
123
129
|
end
|
124
130
|
|
125
|
-
add_index "fe_elements", ["conditional_id"], name: "index_fe_elements_on_conditional_id"
|
126
|
-
add_index "fe_elements", ["question_grid_id"], name: "index_fe_elements_on_question_grid_id"
|
127
|
-
add_index "fe_elements", ["slug"], name: "index_fe_elements_on_slug"
|
131
|
+
add_index "fe_elements", ["conditional_id"], name: "index_fe_elements_on_conditional_id", using: :btree
|
132
|
+
add_index "fe_elements", ["question_grid_id"], name: "index_fe_elements_on_question_grid_id", using: :btree
|
133
|
+
add_index "fe_elements", ["slug"], name: "index_fe_elements_on_slug", using: :btree
|
128
134
|
|
129
135
|
create_table "fe_email_templates", force: true do |t|
|
130
136
|
t.string "name", limit: 1000, null: false
|
@@ -143,16 +149,18 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
143
149
|
t.datetime "updated_at"
|
144
150
|
end
|
145
151
|
|
146
|
-
add_index "fe_page_elements", ["page_id", "element_id"], name: "page_element"
|
152
|
+
add_index "fe_page_elements", ["page_id", "element_id"], name: "page_element", using: :btree
|
147
153
|
|
148
154
|
create_table "fe_pages", force: true do |t|
|
149
|
-
t.integer "question_sheet_id",
|
150
|
-
t.string "label",
|
155
|
+
t.integer "question_sheet_id", null: false
|
156
|
+
t.string "label", limit: 60, null: false
|
151
157
|
t.integer "number"
|
152
|
-
t.boolean "no_cache",
|
153
|
-
t.boolean "hidden",
|
158
|
+
t.boolean "no_cache", default: false
|
159
|
+
t.boolean "hidden", default: false
|
154
160
|
t.datetime "created_at"
|
155
161
|
t.datetime "updated_at"
|
162
|
+
t.text "all_element_ids"
|
163
|
+
t.text "label_translations"
|
156
164
|
end
|
157
165
|
|
158
166
|
create_table "fe_people", force: true do |t|
|
@@ -169,6 +177,7 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
169
177
|
t.boolean "archived", default: false
|
170
178
|
t.datetime "created_at"
|
171
179
|
t.datetime "updated_at"
|
180
|
+
t.text "languages"
|
172
181
|
end
|
173
182
|
|
174
183
|
create_table "fe_references", force: true do |t|
|
@@ -183,13 +192,15 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
183
192
|
t.string "email"
|
184
193
|
t.string "status"
|
185
194
|
t.datetime "submitted_at"
|
195
|
+
t.datetime "started_at"
|
186
196
|
t.string "access_key"
|
187
197
|
t.datetime "created_at"
|
188
198
|
t.datetime "updated_at"
|
199
|
+
t.string "locale", default: "en"
|
189
200
|
end
|
190
201
|
|
191
|
-
add_index "fe_references", ["applicant_answer_sheet_id"], name: "index_fe_references_on_applicant_answer_sheet_id"
|
192
|
-
add_index "fe_references", ["question_id"], name: "index_fe_references_on_question_id"
|
202
|
+
add_index "fe_references", ["applicant_answer_sheet_id"], name: "index_fe_references_on_applicant_answer_sheet_id", using: :btree
|
203
|
+
add_index "fe_references", ["question_id"], name: "index_fe_references_on_question_id", using: :btree
|
193
204
|
|
194
205
|
create_table "fe_users", force: true do |t|
|
195
206
|
t.integer "user_id"
|
@@ -200,4 +211,23 @@ ActiveRecord::Schema.define(version: 20140625160545) do
|
|
200
211
|
t.datetime "updated_at"
|
201
212
|
end
|
202
213
|
|
214
|
+
create_table "phone_numbers", force: true do |t|
|
215
|
+
t.string "number"
|
216
|
+
t.string "extensions"
|
217
|
+
t.integer "person_id"
|
218
|
+
t.string "location"
|
219
|
+
t.boolean "primary"
|
220
|
+
t.string "txt_to_email"
|
221
|
+
t.integer "carrier_id"
|
222
|
+
t.datetime "email_updated_at"
|
223
|
+
t.datetime "created_at"
|
224
|
+
t.datetime "updated_at"
|
225
|
+
end
|
226
|
+
|
227
|
+
create_table "users", force: true do |t|
|
228
|
+
t.string "username"
|
229
|
+
t.string "email"
|
230
|
+
t.integer "person_id"
|
231
|
+
end
|
232
|
+
|
203
233
|
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
DEPRECATION WARNING: `#ignore` is deprecated and will be removed in 5.0. Please use `#transient` instead. (called from block (3 levels) in <top (required)> at /Users/josh/htdocs/fe/spec/factories/question_sheet.rb:6)
|
2
|
+
DEPRECATION WARNING: `#ignore` is deprecated and will be removed in 5.0. Please use `#transient` instead. (called from block (3 levels) in <top (required)> at /Users/josh/htdocs/fe/spec/factories/question_sheet.rb:6)
|
3
|
+
DEPRECATION WARNING: `#ignore` is deprecated and will be removed in 5.0. Please use `#transient` instead. (called from block (3 levels) in <top (required)> at /Users/josh/htdocs/fe/spec/factories/question_sheet.rb:6)
|
4
|
+
DEPRECATION WARNING: `#ignore` is deprecated and will be removed in 5.0. Please use `#transient` instead. (called from block (3 levels) in <top (required)> at /Users/josh/htdocs/fe/spec/factories/question_sheet.rb:6)
|
5
|
+
DEPRECATION WARNING: `#ignore` is deprecated and will be removed in 5.0. Please use `#transient` instead. (called from block (3 levels) in <top (required)> at /Users/josh/htdocs/fe/spec/factories/question_sheet.rb:6)
|
data/spec/factories/elements.rb
CHANGED
@@ -2,18 +2,43 @@ FactoryGirl.define do
|
|
2
2
|
factory :element, class: Fe::Element do
|
3
3
|
sequence :label do |n| "Label Element #{n}" end
|
4
4
|
required true
|
5
|
-
sequence :slug do |n| "element_#{n}" end
|
6
5
|
|
7
6
|
factory :choice_field_element, class: Fe::ChoiceField do
|
8
7
|
kind "Fe::ChoiceField"
|
9
8
|
style "yes-no"
|
10
9
|
content "Choice One\r\nChoice Two\r\nChoice Three"
|
11
10
|
end
|
12
|
-
|
11
|
+
factory :date_field_element, class: Fe::DateField do
|
12
|
+
kind "Fe::DateField"
|
13
|
+
style "date"
|
14
|
+
end
|
13
15
|
factory :text_field_element, class: Fe::TextField do
|
14
16
|
kind "Fe::TextField"
|
15
17
|
style "short"
|
16
18
|
end
|
19
|
+
factory :question_grid, class: Fe::QuestionGrid do
|
20
|
+
kind "Fe::QuestionGrid"
|
21
|
+
style "grid"
|
22
|
+
end
|
23
|
+
factory :question_grid_with_total, class: Fe::QuestionGridWithTotal do
|
24
|
+
kind "Fe::QuestionGridWithTotal"
|
25
|
+
style "grid"
|
26
|
+
end
|
27
|
+
factory :reference_element, class: Fe::ReferenceQuestion do
|
28
|
+
kind "Fe::ReferenceQuestion"
|
29
|
+
style "staff"
|
30
|
+
end
|
31
|
+
factory :section, class: Fe::Section do
|
32
|
+
kind "Fe::Section"
|
33
|
+
style "section"
|
34
|
+
end
|
35
|
+
factory :attachment_field_element, class: Fe::AttachmentField do
|
36
|
+
kind "Fe::AttachmentField"
|
37
|
+
style "section"
|
38
|
+
end
|
39
|
+
factory :state_chooser_element, class: Fe::StateChooser do
|
40
|
+
kind "Fe::StateChooser"
|
41
|
+
style "section"
|
42
|
+
end
|
17
43
|
end
|
18
44
|
end
|
19
|
-
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Read about factories at https://github.com/thoughtbot/factory_girl
|
2
|
+
|
3
|
+
FactoryGirl.define do
|
4
|
+
factory :fe_email_template, :class => Fe::EmailTemplate do
|
5
|
+
sequence(:content) { |n| "content_#{n}" }
|
6
|
+
sequence(:subject) { |n| "subject#{n}" }
|
7
|
+
enabled true
|
8
|
+
end
|
9
|
+
end
|
data/spec/factories/fe_people.rb
CHANGED