fe 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -1
  3. data/Rakefile +22 -13
  4. data/app/assets/javascripts/application.js.erb +1 -0
  5. data/app/assets/javascripts/fe/admin.js +1 -4
  6. data/app/assets/javascripts/fe/{qe.admin.js → fe.admin.js} +15 -0
  7. data/app/assets/javascripts/fe/{qe.common.js → fe.common.js} +0 -0
  8. data/app/assets/javascripts/fe/{qe.public.js → fe.public.js} +115 -27
  9. data/app/assets/javascripts/fe/rails.extra.js +6 -0
  10. data/app/assets/stylesheets/fe/{qe.screen.css.scss.erb → fe.screen.css.scss.erb} +12 -18
  11. data/app/controllers/fe/admin/elements_controller.rb +4 -4
  12. data/app/controllers/fe/admin/email_templates_controller.rb +10 -4
  13. data/app/controllers/fe/admin/question_pages_controller.rb +3 -3
  14. data/app/controllers/fe/admin/question_sheets_controller.rb +6 -5
  15. data/app/controllers/fe/applications_controller.rb +183 -0
  16. data/app/controllers/fe/concerns/answer_pages_controller_concern.rb +5 -2
  17. data/app/controllers/fe/concerns/answer_sheets_controller_concern.rb +10 -6
  18. data/app/controllers/fe/concerns/application_controller_concern.rb +34 -0
  19. data/app/controllers/fe/payments_controller.rb +184 -0
  20. data/app/controllers/fe/reference_pages_controller.rb +41 -0
  21. data/app/controllers/fe/reference_sheets_controller.rb +1 -1
  22. data/app/controllers/fe/references_controller.rb +74 -0
  23. data/app/controllers/fe/submit_pages_controller.rb +22 -0
  24. data/app/helpers/fe/application_helper.rb +14 -5
  25. data/app/mailers/fe/notifier.rb +1 -1
  26. data/app/models/fe/address.rb +3 -0
  27. data/app/models/fe/answer_pages_presenter.rb +1 -1
  28. data/app/models/fe/answer_sheet.rb +6 -2
  29. data/app/models/fe/answer_sheet_question_sheet.rb +1 -1
  30. data/app/models/fe/application.rb +58 -0
  31. data/app/models/fe/choice_field.rb +1 -1
  32. data/app/models/fe/concerns/answer_concern.rb +10 -11
  33. data/app/models/fe/concerns/answer_pages_presenter_concern.rb +16 -7
  34. data/app/models/fe/concerns/answer_sheet_concern.rb +10 -16
  35. data/app/models/fe/concerns/choice_field_concern.rb +21 -10
  36. data/app/models/fe/condition.rb +1 -1
  37. data/app/models/fe/current_address.rb +12 -0
  38. data/app/models/fe/date_field.rb +3 -3
  39. data/app/models/fe/element.rb +66 -9
  40. data/app/models/fe/email_address.rb +7 -0
  41. data/app/models/fe/email_template.rb +1 -1
  42. data/app/models/fe/option.rb +1 -1
  43. data/app/models/fe/option_group.rb +1 -1
  44. data/app/models/fe/page.rb +13 -4
  45. data/app/models/fe/page_element.rb +13 -1
  46. data/app/models/fe/page_link.rb +1 -1
  47. data/app/models/fe/paragraph.rb +1 -1
  48. data/app/models/fe/payment.rb +32 -7
  49. data/app/models/fe/payment_question.rb +1 -1
  50. data/app/models/fe/person.rb +33 -0
  51. data/app/models/fe/phone_number.rb +5 -0
  52. data/app/models/fe/presenter.rb +3 -2
  53. data/app/models/fe/question.rb +7 -7
  54. data/app/models/fe/question_grid.rb +1 -2
  55. data/app/models/fe/question_set.rb +1 -1
  56. data/app/models/fe/question_sheet.rb +9 -3
  57. data/app/models/fe/reference_question.rb +2 -2
  58. data/app/models/fe/reference_sheet.rb +28 -4
  59. data/app/models/fe/section.rb +1 -1
  60. data/app/models/fe/state_chooser.rb +1 -1
  61. data/app/models/fe/text_field.rb +3 -3
  62. data/app/models/fe/user.rb +3 -0
  63. data/app/models/staff.rb +120 -0
  64. data/app/views/fe/admin/elements/_errors.html.erb +11 -1
  65. data/app/views/fe/admin/elements/create.js.erb +3 -3
  66. data/app/views/fe/admin/elements/destroy.js.erb +2 -2
  67. data/app/views/fe/admin/elements/drop.js.erb +1 -1
  68. data/app/views/fe/admin/elements/duplicate.js.erb +1 -1
  69. data/app/views/fe/admin/elements/edit.js.erb +1 -1
  70. data/app/views/fe/admin/elements/error.js.erb +1 -1
  71. data/app/views/fe/admin/elements/new.js.erb +3 -3
  72. data/app/views/fe/admin/elements/update.js.erb +2 -2
  73. data/app/views/fe/admin/email_templates/edit.html.erb +9 -9
  74. data/app/views/fe/admin/email_templates/index.html.erb +3 -3
  75. data/app/views/fe/admin/email_templates/new.html.erb +2 -2
  76. data/app/views/fe/admin/panels/_advanced_options.html.erb +28 -1
  77. data/app/views/fe/admin/panels/_common_fields.html.erb +1 -1
  78. data/app/views/fe/admin/panels/_condition.html.erb +1 -1
  79. data/app/views/fe/admin/panels/_insert.html.erb +13 -13
  80. data/app/views/fe/admin/panels/_nav_controls.html.erb +4 -4
  81. data/app/views/fe/admin/panels/_page.html.erb +2 -2
  82. data/app/views/fe/admin/panels/_pages_list.html.erb +4 -4
  83. data/app/views/fe/admin/panels/_prop_attachment_field.html.erb +1 -1
  84. data/app/views/fe/admin/panels/_prop_choice_field.html.erb +10 -10
  85. data/app/views/fe/admin/panels/_prop_date_field.html.erb +1 -1
  86. data/app/views/fe/admin/panels/_prop_element.html.erb +7 -7
  87. data/app/views/fe/admin/panels/_prop_page.html.erb +2 -2
  88. data/app/views/fe/admin/panels/_prop_paragraph.html.erb +1 -1
  89. data/app/views/fe/admin/panels/_prop_payment_question.html.erb +1 -0
  90. data/app/views/fe/admin/panels/_prop_question_grid.html.erb +2 -2
  91. data/app/views/fe/admin/panels/_prop_question_grid_with_total.html.erb +1 -1
  92. data/app/views/fe/admin/panels/_prop_reference_question.html.erb +2 -2
  93. data/app/views/fe/admin/panels/_prop_section.html.erb +1 -1
  94. data/app/views/fe/admin/panels/_prop_sheet.html.erb +9 -9
  95. data/app/views/fe/admin/panels/_prop_text_field.html.erb +10 -10
  96. data/app/views/fe/admin/question_pages/_element.html.erb +5 -5
  97. data/app/views/fe/admin/question_pages/_element_show.html.erb +1 -1
  98. data/app/views/fe/admin/question_pages/_errors.html.erb +10 -1
  99. data/app/views/fe/admin/question_pages/_question_page.html.erb +3 -3
  100. data/app/views/fe/admin/question_pages/create.js.erb +3 -3
  101. data/app/views/fe/admin/question_pages/destroy.js.erb +3 -3
  102. data/app/views/fe/admin/question_pages/edit.js.erb +1 -1
  103. data/app/views/fe/admin/question_pages/show.js.erb +3 -2
  104. data/app/views/fe/admin/question_pages/show_panel.js.erb +1 -1
  105. data/app/views/fe/admin/question_sheets/_errors.html.erb +11 -1
  106. data/app/views/fe/admin/question_sheets/edit.js.erb +1 -1
  107. data/app/views/fe/admin/question_sheets/error.js.erb +1 -1
  108. data/app/views/fe/admin/question_sheets/index.html.erb +8 -8
  109. data/app/views/fe/admin/question_sheets/new.html.erb +1 -1
  110. data/app/views/fe/admin/question_sheets/show.html.erb +18 -18
  111. data/app/views/fe/admin/question_sheets/update.js.erb +1 -1
  112. data/app/views/fe/answer_pages/_answer_page.html.erb +27 -30
  113. data/app/views/fe/answer_pages/_element.html.erb +5 -1
  114. data/app/views/fe/answer_pages/update.js.erb +1 -1
  115. data/app/views/fe/answer_sheets/_answer_sheet.html.erb +16 -14
  116. data/app/views/fe/answer_sheets/_element.html.erb +1 -1
  117. data/app/views/fe/answer_sheets/_incomplete.html.erb +8 -8
  118. data/app/views/fe/answer_sheets/_page_link.html.erb +2 -2
  119. data/app/views/fe/answer_sheets/_pages_list.html.erb +4 -4
  120. data/app/views/fe/answer_sheets/_title.html.erb +1 -1
  121. data/app/views/fe/answer_sheets/edit.html.erb +59 -53
  122. data/app/views/fe/answer_sheets/incomplete.js.erb +2 -2
  123. data/app/views/fe/answer_sheets/send_reference_invite.js.erb +1 -1
  124. data/app/views/fe/application/_logout.html.erb +1 -0
  125. data/app/views/fe/payment_pages/_credit.html.erb +47 -0
  126. data/app/views/fe/payment_pages/_mail.html.erb +27 -0
  127. data/app/views/fe/payment_pages/_payment.html.erb +6 -0
  128. data/app/views/fe/payment_pages/_staff.html.erb +25 -0
  129. data/app/views/fe/payment_pages/_staff_results.html.erb +17 -0
  130. data/app/views/fe/payment_pages/edit.html.erb +75 -0
  131. data/app/views/fe/payment_pages/staff_search.js.erb +2 -0
  132. data/app/views/fe/payments/_credit.html.erb +47 -0
  133. data/app/views/fe/payments/_errors.html.erb +1 -0
  134. data/app/views/fe/payments/_payment.html.erb +13 -0
  135. data/app/views/fe/payments/_staff.html.erb +21 -0
  136. data/app/views/fe/payments/_staff_results.html.erb +18 -0
  137. data/app/views/fe/payments/approve.js.erb +3 -0
  138. data/app/views/fe/payments/create.js.erb +19 -0
  139. data/app/views/fe/payments/destroy.js.erb +7 -0
  140. data/app/views/fe/payments/edit.html.erb +56 -0
  141. data/app/views/fe/payments/error.js.erb +3 -0
  142. data/app/views/fe/payments/no_access.html.erb +7 -0
  143. data/app/views/fe/payments/staff_search.js.erb +1 -0
  144. data/app/views/fe/payments/update.html.erb +24 -0
  145. data/app/views/fe/questions/{_acceptance.html.erb → fe/_acceptance.html.erb} +0 -0
  146. data/app/views/fe/questions/{_attachment_field.html.erb → fe/_attachment_field.html.erb} +2 -2
  147. data/app/views/fe/questions/{_checkbox_field.html.erb → fe/_checkbox_field.html.erb} +1 -1
  148. data/app/views/fe/questions/{_country.html.erb → fe/_country.html.erb} +1 -1
  149. data/app/views/fe/questions/{_date_field.html.erb → fe/_date_field.html.erb} +0 -0
  150. data/app/views/fe/questions/{_date_field_mmyy.html.erb → fe/_date_field_mmyy.html.erb} +0 -0
  151. data/app/views/fe/questions/{_drop_down_field.html.erb → fe/_drop_down_field.html.erb} +1 -1
  152. data/app/views/fe/questions/fe/_paragraph.html.erb +1 -0
  153. data/app/views/fe/questions/fe/_payment_question.html.erb +70 -0
  154. data/app/views/fe/questions/{_question_grid.html.erb → fe/_question_grid.html.erb} +7 -7
  155. data/app/views/fe/questions/{_question_grid_with_total.html.erb → fe/_question_grid_with_total.html.erb} +1 -1
  156. data/app/views/fe/questions/{_questions.html.erb → fe/_questions.html.erb} +2 -2
  157. data/app/views/fe/questions/{_radio_button_field.html.erb → fe/_radio_button_field.html.erb} +13 -11
  158. data/app/views/fe/questions/{_rating.html.erb → fe/_rating.html.erb} +0 -0
  159. data/app/views/fe/questions/fe/_reference_discipler.html.erb +1 -0
  160. data/app/views/fe/questions/fe/_reference_friend.html.erb +1 -0
  161. data/app/views/fe/questions/fe/_reference_parent.html.erb +1 -0
  162. data/app/views/fe/questions/fe/_reference_peer.html.erb +1 -0
  163. data/app/views/fe/questions/fe/_reference_question.html.erb +38 -0
  164. data/app/views/fe/questions/fe/_reference_roommate.html.erb +1 -0
  165. data/app/views/fe/questions/fe/_reference_spiritual.html.erb +1 -0
  166. data/app/views/fe/questions/fe/_reference_staff.html.erb +1 -0
  167. data/app/views/fe/questions/fe/_section.html.erb +1 -0
  168. data/app/views/fe/questions/{_state_chooser.html.erb → fe/_state_chooser.html.erb} +0 -0
  169. data/app/views/fe/questions/{_text_area_field.html.erb → fe/_text_area_field.html.erb} +0 -0
  170. data/app/views/fe/questions/{_text_field.html.erb → fe/_text_field.html.erb} +0 -0
  171. data/app/views/fe/questions/{_yes_no.html.erb → fe/_yes_no.html.erb} +6 -6
  172. data/app/views/fe/questions/{_yes_no_field.erb → fe/_yes_no_field.erb} +1 -1
  173. data/app/views/fe/reference_pages/_reference.html.erb +31 -0
  174. data/app/views/fe/reference_pages/edit.html.erb +24 -0
  175. data/app/views/fe/reference_sheets/done.html.erb +2 -0
  176. data/app/views/fe/reference_sheets/submitted.js.erb +1 -0
  177. data/app/views/fe/references/edit.html.erb +8 -0
  178. data/app/views/fe/references/send_invite.js.erb +7 -0
  179. data/app/views/fe/references/show.html.erb +18 -0
  180. data/app/views/fe/references/submit.js.erb +3 -0
  181. data/app/views/fe/submit_pages/_errors.html.erb +1 -0
  182. data/app/views/fe/submit_pages/_thankyou.html.erb +2 -0
  183. data/app/views/fe/submit_pages/edit.html.erb +36 -0
  184. data/app/views/fe/submit_pages/error.js.erb +1 -0
  185. data/app/views/fe/submit_pages/submit.js.erb +3 -0
  186. data/app/views/layouts/fe/application.html.erb +30 -13
  187. data/app/views/layouts/fe/{qe.admin.html.erb → fe.admin.html.erb} +1 -1
  188. data/config/locales/en.yml +37 -0
  189. data/config/routes.rb +69 -27
  190. data/db/migrate/20131003041856_core.rb +4 -4
  191. data/db/migrate/20131003044518_create_email_templates.rb +1 -1
  192. data/db/migrate/20140623153424_create_fe_people.rb +12 -0
  193. data/db/migrate/20140624180246_create_fe_addresses.rb +20 -0
  194. data/db/migrate/20140624182216_create_create_fe_phone_numbers.rb +16 -0
  195. data/db/migrate/20140625160545_create_fe_users.rb +12 -0
  196. data/db/migrate/20140808202507_add_conditional_type_to_elements.rb +5 -0
  197. data/db/migrate/20140808203609_add_conditional_answer_to_elements.rb +5 -0
  198. data/db/migrate/20140828045339_create_payments.rb +13 -0
  199. data/db/migrate/20141103204704_remove_short_value_column.rb +5 -0
  200. data/db/migrate/20141109154522_move_conditional_ids_used_for_choice_field_to_their_own_column.rb +7 -0
  201. data/db/seeds.rb +7 -0
  202. data/lib/fe.rb +1 -1
  203. data/lib/fe/engine.rb +46 -1
  204. data/lib/fe/version.rb +1 -1
  205. data/lib/tasks/fe_tasks.rake +14 -0
  206. data/spec/controllers/fe/admin/elements_controller_spec.rb +1 -1
  207. data/spec/controllers/fe/admin/email_templates_controller_spec.rb +1 -1
  208. data/spec/controllers/fe/admin/question_pages_controller_spec.rb +1 -1
  209. data/spec/controllers/fe/admin/question_sheets_controller_spec.rb +1 -1
  210. data/spec/controllers/fe/answer_pages_controller_spec.rb +1 -1
  211. data/spec/controllers/fe/answer_sheets_controller_spec.rb +1 -1
  212. data/spec/controllers/fe/reference_sheets_controller_spec.rb +1 -1
  213. data/spec/dummy/README.rdoc +28 -0
  214. data/spec/dummy/Rakefile +6 -0
  215. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  216. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  217. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  218. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  219. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  220. data/spec/dummy/bin/bundle +3 -0
  221. data/spec/dummy/bin/rails +4 -0
  222. data/spec/dummy/bin/rake +4 -0
  223. data/spec/dummy/config.ru +4 -0
  224. data/spec/dummy/config/application.rb +29 -0
  225. data/spec/dummy/config/boot.rb +5 -0
  226. data/spec/dummy/config/database.yml +25 -0
  227. data/spec/dummy/config/environment.rb +5 -0
  228. data/spec/dummy/config/environments/development.rb +37 -0
  229. data/spec/dummy/config/environments/production.rb +82 -0
  230. data/spec/dummy/config/environments/test.rb +39 -0
  231. data/spec/dummy/config/initializers/assets.rb +8 -0
  232. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  233. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  234. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  235. data/spec/dummy/config/initializers/inflections.rb +16 -0
  236. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  237. data/spec/dummy/config/initializers/session_store.rb +3 -0
  238. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  239. data/spec/dummy/config/locales/en.yml +23 -0
  240. data/spec/dummy/config/routes.rb +56 -0
  241. data/spec/dummy/config/secrets.yml +22 -0
  242. data/spec/dummy/db/schema.rb +203 -0
  243. data/spec/dummy/db/test.sqlite3 +0 -0
  244. data/spec/dummy/log/test.log +440 -0
  245. data/spec/dummy/public/404.html +67 -0
  246. data/spec/dummy/public/422.html +67 -0
  247. data/spec/dummy/public/500.html +66 -0
  248. data/spec/dummy/public/favicon.ico +0 -0
  249. data/spec/factories/answer_sheet_question_sheets.rb +4 -0
  250. data/spec/factories/answer_sheets.rb +1 -1
  251. data/spec/factories/applications.rb +7 -0
  252. data/spec/factories/elements.rb +19 -0
  253. data/spec/factories/fe_addresses.rb +14 -0
  254. data/spec/factories/fe_email_addresses.rb +7 -0
  255. data/spec/factories/fe_people.rb +10 -0
  256. data/spec/factories/fe_phone_numbers.rb +7 -0
  257. data/spec/factories/page.rb +9 -0
  258. data/spec/factories/page_elements.rb +5 -0
  259. data/spec/factories/payments.rb +7 -0
  260. data/spec/factories/question_sheet.rb +10 -0
  261. data/spec/models/fe/answer_sheet_question_sheet_spec.rb +3 -3
  262. data/spec/models/fe/answer_spec.rb +5 -5
  263. data/spec/models/fe/application_spec.rb +8 -0
  264. data/spec/models/fe/attachment_field_spec.rb +1 -1
  265. data/spec/models/fe/choice_field_spec.rb +29 -2
  266. data/spec/models/fe/condition_spec.rb +5 -5
  267. data/spec/models/fe/date_field_spec.rb +9 -9
  268. data/spec/models/fe/element_spec.rb +139 -9
  269. data/spec/models/fe/email_template_spec.rb +2 -2
  270. data/spec/models/fe/option_group_spec.rb +1 -1
  271. data/spec/models/fe/option_spec.rb +1 -1
  272. data/spec/models/fe/page_element_spec.rb +3 -3
  273. data/spec/models/fe/page_link_spec.rb +1 -1
  274. data/spec/models/fe/page_spec.rb +43 -11
  275. data/spec/models/fe/paragraph_spec.rb +4 -4
  276. data/spec/models/fe/payment_question_spec.rb +65 -0
  277. data/spec/models/fe/person_spec.rb +4 -0
  278. data/spec/models/fe/question_grid_spec.rb +1 -1
  279. data/spec/models/fe/question_grid_with_total_spec.rb +1 -1
  280. data/spec/models/fe/question_set_spec.rb +1 -1
  281. data/spec/models/fe/question_sheet_spec.rb +5 -5
  282. data/spec/models/fe/question_spec.rb +13 -12
  283. data/spec/models/fe/reference_question_spec.rb +4 -4
  284. data/spec/models/fe/reference_sheet_spec.rb +8 -8
  285. data/spec/models/fe/section_spec.rb +1 -1
  286. data/spec/models/fe/state_chooser_spec.rb +1 -1
  287. data/spec/models/fe/text_field_spec.rb +3 -3
  288. data/spec/{spec_helper.rb → rails_helper.rb} +3 -3
  289. data/spec/support/database.txt +3 -3
  290. metadata +261 -75
  291. data/app/views/fe/questions/_paragraph.html.erb +0 -1
  292. data/app/views/fe/questions/_reference_discipler.html.erb +0 -1
  293. data/app/views/fe/questions/_reference_friend.html.erb +0 -1
  294. data/app/views/fe/questions/_reference_parent.html.erb +0 -1
  295. data/app/views/fe/questions/_reference_peer.html.erb +0 -1
  296. data/app/views/fe/questions/_reference_question.html.erb +0 -38
  297. data/app/views/fe/questions/_reference_roommate.html.erb +0 -1
  298. data/app/views/fe/questions/_reference_spiritual.html.erb +0 -1
  299. data/app/views/fe/questions/_reference_staff.html.erb +0 -1
  300. data/app/views/fe/questions/_section.html.erb +0 -1
  301. data/lib/generators/fe/install_generator.rb +0 -132
  302. data/lib/tasks/qe_tasks.rake +0 -4
  303. data/spec/models/fe/answer_sheet_spec.rb +0 -8
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 4c4dbf94a427eb6648bcf5d0ceee9735494fb8c05b3da4dcf5351573b07e3c9cf4dcb236e552ae525f0c53408b1c5fcbb5f8714fba8a1133ee6d5af8c46e708b
15
+
16
+ test:
17
+ secret_key_base: 82e472cce2f166e5518ca8e743e5fa872e481940b342280ed65abc058a9b64783b149e6ecbeeca224f96049cafb521be2bbffec1ee80d2daee63844bea002445
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,203 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140625160545) do
15
+
16
+ create_table "create_fe_phone_numbers", force: true do |t|
17
+ t.string "number"
18
+ t.string "extensions"
19
+ t.integer "person_id"
20
+ t.string "location"
21
+ t.boolean "primary"
22
+ t.string "txt_to_email"
23
+ t.integer "carrier_id"
24
+ t.datetime "email_updated_at"
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
+ end
28
+
29
+ create_table "fe_addresses", force: true do |t|
30
+ t.datetime "startdate"
31
+ t.datetime "enddate"
32
+ t.string "address1"
33
+ t.string "address2"
34
+ t.string "address3"
35
+ t.string "address4"
36
+ t.string "address_type"
37
+ t.string "city"
38
+ t.string "state"
39
+ t.string "zip"
40
+ t.string "country"
41
+ t.integer "person_id"
42
+ t.datetime "created_at"
43
+ t.datetime "updated_at"
44
+ end
45
+
46
+ create_table "fe_answer_sheet_question_sheets", force: true do |t|
47
+ t.integer "answer_sheet_id"
48
+ t.integer "question_sheet_id"
49
+ t.datetime "created_at"
50
+ t.datetime "updated_at"
51
+ end
52
+
53
+ add_index "fe_answer_sheet_question_sheets", ["answer_sheet_id", "question_sheet_id"], name: "answer_sheet_question_sheet"
54
+
55
+ create_table "fe_answers", force: true do |t|
56
+ t.integer "answer_sheet_id", null: false
57
+ t.integer "question_id", null: false
58
+ t.text "value"
59
+ t.string "short_value"
60
+ t.integer "attachment_file_size"
61
+ t.string "attachment_content_type"
62
+ t.string "attachment_file_name"
63
+ t.datetime "attachment_updated_at"
64
+ t.datetime "created_at"
65
+ t.datetime "updated_at"
66
+ end
67
+
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"
70
+
71
+ create_table "fe_applications", force: true do |t|
72
+ t.integer "applicant_id"
73
+ t.string "status"
74
+ t.datetime "submitted_at"
75
+ t.datetime "created_at"
76
+ t.datetime "updated_at"
77
+ end
78
+
79
+ add_index "fe_applications", ["applicant_id"], name: "question_sheet_id"
80
+
81
+ create_table "fe_conditions", force: true do |t|
82
+ t.integer "question_sheet_id", null: false
83
+ t.integer "trigger_id", null: false
84
+ t.string "expression", null: false
85
+ t.integer "toggle_page_id", null: false
86
+ t.integer "toggle_id"
87
+ t.datetime "created_at"
88
+ t.datetime "updated_at"
89
+ end
90
+
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"
95
+
96
+ create_table "fe_elements", force: true do |t|
97
+ t.integer "question_grid_id"
98
+ t.string "kind", limit: 40, null: false
99
+ t.string "style", limit: 40
100
+ t.string "label"
101
+ t.text "content"
102
+ t.boolean "required"
103
+ t.string "slug", limit: 36
104
+ t.integer "position"
105
+ t.string "object_name"
106
+ t.string "attribute_name"
107
+ t.string "source"
108
+ t.string "value_xpath"
109
+ t.string "text_xpath"
110
+ t.string "cols"
111
+ t.boolean "is_confidential", default: false
112
+ t.string "total_cols"
113
+ t.string "css_id"
114
+ t.string "css_class"
115
+ t.datetime "created_at"
116
+ t.datetime "updated_at"
117
+ t.integer "related_question_sheet_id"
118
+ t.integer "conditional_id"
119
+ t.text "tooltip"
120
+ t.boolean "hide_label", default: false
121
+ t.boolean "hide_option_labels", default: false
122
+ t.integer "max_length"
123
+ end
124
+
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"
128
+
129
+ create_table "fe_email_templates", force: true do |t|
130
+ t.string "name", limit: 1000, null: false
131
+ t.text "content"
132
+ t.boolean "enabled"
133
+ t.string "subject"
134
+ t.datetime "created_at"
135
+ t.datetime "updated_at"
136
+ end
137
+
138
+ create_table "fe_page_elements", force: true do |t|
139
+ t.integer "page_id"
140
+ t.integer "element_id"
141
+ t.integer "position"
142
+ t.datetime "created_at"
143
+ t.datetime "updated_at"
144
+ end
145
+
146
+ add_index "fe_page_elements", ["page_id", "element_id"], name: "page_element"
147
+
148
+ create_table "fe_pages", force: true do |t|
149
+ t.integer "question_sheet_id", null: false
150
+ t.string "label", limit: 60, null: false
151
+ t.integer "number"
152
+ t.boolean "no_cache", default: false
153
+ t.boolean "hidden", default: false
154
+ t.datetime "created_at"
155
+ t.datetime "updated_at"
156
+ end
157
+
158
+ create_table "fe_people", force: true do |t|
159
+ t.string "first_name"
160
+ t.string "last_name"
161
+ t.integer "user_id"
162
+ t.boolean "is_staff"
163
+ t.datetime "created_at"
164
+ t.datetime "updated_at"
165
+ end
166
+
167
+ create_table "fe_question_sheets", force: true do |t|
168
+ t.string "label", limit: 100, null: false
169
+ t.boolean "archived", default: false
170
+ t.datetime "created_at"
171
+ t.datetime "updated_at"
172
+ end
173
+
174
+ create_table "fe_references", force: true do |t|
175
+ t.integer "question_id"
176
+ t.integer "applicant_answer_sheet_id"
177
+ t.datetime "email_sent_at"
178
+ t.string "relationship"
179
+ t.string "title"
180
+ t.string "first_name"
181
+ t.string "last_name"
182
+ t.string "phone"
183
+ t.string "email"
184
+ t.string "status"
185
+ t.datetime "submitted_at"
186
+ t.string "access_key"
187
+ t.datetime "created_at"
188
+ t.datetime "updated_at"
189
+ end
190
+
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"
193
+
194
+ create_table "fe_users", force: true do |t|
195
+ t.integer "user_id"
196
+ t.datetime "last_login"
197
+ t.string "type"
198
+ t.string "role"
199
+ t.datetime "created_at"
200
+ t.datetime "updated_at"
201
+ end
202
+
203
+ end
Binary file
@@ -0,0 +1,440 @@
1
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.5ms) select sqlite_version(*)
3
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to Core (20131003041856)
6
+  (0.1ms) begin transaction
7
+  (0.4ms) CREATE TABLE "fe_question_sheets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "label" varchar(100) NOT NULL, "archived" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime)
8
+  (0.2ms) CREATE TABLE "fe_applications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "applicant_id" integer, "status" varchar(255), "submitted_at" datetime, "created_at" datetime, "updated_at" datetime) 
9
+  (0.1ms) CREATE INDEX "question_sheet_id" ON "fe_applications" ("applicant_id")
10
+  (0.2ms) CREATE TABLE "fe_pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_sheet_id" integer NOT NULL, "label" varchar(60) NOT NULL, "number" integer, "no_cache" boolean DEFAULT 'f', "hidden" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime) 
11
+  (0.2ms) CREATE TABLE "fe_elements" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_grid_id" integer, "kind" varchar(40) NOT NULL, "style" varchar(40), "label" varchar(255), "content" text, "required" boolean, "slug" varchar(36), "position" integer, "object_name" varchar(255), "attribute_name" varchar(255), "source" varchar(255), "value_xpath" varchar(255), "text_xpath" varchar(255), "cols" varchar(255), "is_confidential" boolean DEFAULT 'f', "total_cols" varchar(255), "css_id" varchar(255), "css_class" varchar(255), "question_sheet_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
12
+  (0.1ms) CREATE INDEX "index_fe_elements_on_slug" ON "fe_elements" ("slug")
13
+  (0.1ms) CREATE TABLE "fe_page_elements" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "page_id" integer, "element_id" integer, "position" integer, "created_at" datetime, "updated_at" datetime)
14
+  (0.1ms) CREATE INDEX "page_element" ON "fe_page_elements" ("page_id", "element_id")
15
+  (0.1ms) CREATE TABLE "fe_answers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "answer_sheet_id" integer NOT NULL, "question_id" integer NOT NULL, "value" text, "short_value" varchar(255), "attachment_file_size" integer, "attachment_content_type" varchar(255), "attachment_file_name" varchar(255), "attachment_updated_at" datetime, "created_at" datetime, "updated_at" datetime)
16
+  (0.1ms) CREATE INDEX "index_fe_answers_on_short_value" ON "fe_answers" ("short_value")
17
+  (0.1ms) SELECT sql
18
+ FROM sqlite_master
19
+ WHERE name='index_fe_answers_on_short_value' AND type='index'
20
+ UNION ALL
21
+ SELECT sql
22
+ FROM sqlite_temp_master
23
+ WHERE name='index_fe_answers_on_short_value' AND type='index'
24
+
25
+  (0.1ms) CREATE INDEX "answer_sheet_question" ON "fe_answers" ("answer_sheet_id", "question_id")
26
+  (0.1ms) CREATE TABLE "fe_conditions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_sheet_id" integer NOT NULL, "trigger_id" integer NOT NULL, "expression" varchar(255) NOT NULL, "toggle_page_id" integer NOT NULL, "toggle_id" integer, "created_at" datetime, "updated_at" datetime)
27
+  (0.1ms) CREATE INDEX "index_fe_conditions_on_question_sheet_id" ON "fe_conditions" ("question_sheet_id")
28
+  (0.1ms) SELECT sql
29
+ FROM sqlite_master
30
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
31
+ UNION ALL
32
+ SELECT sql
33
+ FROM sqlite_temp_master
34
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
35
+
36
+  (0.1ms) CREATE INDEX "index_fe_conditions_on_trigger_id" ON "fe_conditions" ("trigger_id")
37
+  (0.1ms) SELECT sql
38
+ FROM sqlite_master
39
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
40
+ UNION ALL
41
+ SELECT sql
42
+ FROM sqlite_temp_master
43
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
44
+
45
+  (0.1ms)  SELECT sql
46
+ FROM sqlite_master
47
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
48
+ UNION ALL
49
+ SELECT sql
50
+ FROM sqlite_temp_master
51
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
52
+ 
53
+  (0.1ms) CREATE INDEX "index_fe_conditions_on_toggle_page_id" ON "fe_conditions" ("toggle_page_id")
54
+  (0.1ms)  SELECT sql
55
+ FROM sqlite_master
56
+ WHERE name='index_fe_conditions_on_toggle_page_id' AND type='index'
57
+ UNION ALL
58
+ SELECT sql
59
+ FROM sqlite_temp_master
60
+ WHERE name='index_fe_conditions_on_toggle_page_id' AND type='index'
61
+ 
62
+  (0.1ms) SELECT sql
63
+ FROM sqlite_master
64
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
65
+ UNION ALL
66
+ SELECT sql
67
+ FROM sqlite_temp_master
68
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
69
+
70
+  (0.1ms)  SELECT sql
71
+ FROM sqlite_master
72
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
73
+ UNION ALL
74
+ SELECT sql
75
+ FROM sqlite_temp_master
76
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
77
+ 
78
+  (0.1ms) CREATE INDEX "index_fe_conditions_on_toggle_id" ON "fe_conditions" ("toggle_id")
79
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003041856"]]
80
+  (1.0ms) commit transaction
81
+ Migrating to CreateReferenceSheets (20131003044250)
82
+  (0.0ms) begin transaction
83
+  (0.4ms) CREATE TABLE "fe_references" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_id" integer, "applicant_answer_sheet_id" integer, "email_sent_at" datetime, "relationship" varchar(255), "title" varchar(255), "first_name" varchar(255), "last_name" varchar(255), "phone" varchar(255), "email" varchar(255), "status" varchar(255), "submitted_at" datetime, "access_key" varchar(255), "created_at" datetime, "updated_at" datetime)
84
+  (0.7ms) ALTER TABLE "fe_elements" ADD "related_question_sheet_id" integer
85
+  (0.1ms) CREATE INDEX "index_fe_references_on_question_id" ON "fe_references" ("question_id")
86
+  (0.1ms)  SELECT sql
87
+ FROM sqlite_master
88
+ WHERE name='index_fe_references_on_question_id' AND type='index'
89
+ UNION ALL
90
+ SELECT sql
91
+ FROM sqlite_temp_master
92
+ WHERE name='index_fe_references_on_question_id' AND type='index'
93
+ 
94
+  (0.1ms) CREATE INDEX "index_fe_references_on_applicant_answer_sheet_id" ON "fe_references" ("applicant_answer_sheet_id")
95
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003044250"]]
96
+  (0.9ms) commit transaction
97
+ Migrating to AddElementAndAnswerFields (20131003044436)
98
+  (0.0ms) begin transaction
99
+  (0.3ms) ALTER TABLE "fe_elements" ADD "conditional_id" integer
100
+  (0.2ms) ALTER TABLE "fe_elements" ADD "tooltip" text
101
+  (0.2ms) ALTER TABLE "fe_elements" ADD "hide_label" boolean DEFAULT 'f'
102
+  (0.2ms) ALTER TABLE "fe_elements" ADD "hide_option_labels" boolean DEFAULT 'f'
103
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003044436"]]
104
+  (0.7ms) commit transaction
105
+ Migrating to CreateEmailTemplates (20131003044518)
106
+  (0.0ms) begin transaction
107
+  (0.3ms) CREATE TABLE "fe_email_templates" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(1000) NOT NULL, "content" text, "enabled" boolean, "subject" varchar(255), "created_at" datetime, "updated_at" datetime) 
108
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003044518"]]
109
+  (0.7ms) commit transaction
110
+ Migrating to AddMaxLengths (20131003044621)
111
+  (0.0ms) begin transaction
112
+  (0.4ms) ALTER TABLE "fe_elements" ADD "max_length" integer
113
+  (0.1ms) SELECT sql
114
+ FROM sqlite_master
115
+ WHERE name='index_fe_elements_on_slug' AND type='index'
116
+ UNION ALL
117
+ SELECT sql
118
+ FROM sqlite_temp_master
119
+ WHERE name='index_fe_elements_on_slug' AND type='index'
120
+
121
+  (0.1ms) CREATE INDEX "index_fe_elements_on_conditional_id" ON "fe_elements" ("conditional_id")
122
+  (0.1ms) SELECT sql
123
+ FROM sqlite_master
124
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
125
+ UNION ALL
126
+ SELECT sql
127
+ FROM sqlite_temp_master
128
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
129
+
130
+  (0.1ms)  SELECT sql
131
+ FROM sqlite_master
132
+ WHERE name='index_fe_elements_on_slug' AND type='index'
133
+ UNION ALL
134
+ SELECT sql
135
+ FROM sqlite_temp_master
136
+ WHERE name='index_fe_elements_on_slug' AND type='index'
137
+ 
138
+  (0.1ms) CREATE INDEX "index_fe_elements_on_question_grid_id" ON "fe_elements" ("question_grid_id")
139
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003044621"]]
140
+  (0.8ms) commit transaction
141
+ Migrating to CreateJoinTable (20131003044714)
142
+  (0.1ms) begin transaction
143
+  (0.3ms) CREATE TABLE "fe_answer_sheet_question_sheets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "answer_sheet_id" integer, "question_sheet_id" integer, "created_at" datetime, "updated_at" datetime)
144
+  (0.1ms) CREATE INDEX "answer_sheet_question_sheet" ON "fe_answer_sheet_question_sheets" ("answer_sheet_id", "question_sheet_id")
145
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131003044714"]]
146
+  (0.8ms) commit transaction
147
+ Migrating to RemoveQuestionIdFromElement (20131016162128)
148
+  (0.0ms) begin transaction
149
+  (0.9ms) CREATE TEMPORARY TABLE "afe_elements" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_grid_id" integer, "kind" varchar(40) NOT NULL, "style" varchar(40), "label" varchar(255), "content" text, "required" boolean, "slug" varchar(36), "position" integer, "object_name" varchar(255), "attribute_name" varchar(255), "source" varchar(255), "value_xpath" varchar(255), "text_xpath" varchar(255), "cols" varchar(255), "is_confidential" boolean DEFAULT 'f', "total_cols" varchar(255), "css_id" varchar(255), "css_class" varchar(255), "question_sheet_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime, "related_question_sheet_id" integer, "conditional_id" integer, "tooltip" text, "hide_label" boolean DEFAULT 'f', "hide_option_labels" boolean DEFAULT 'f', "max_length" integer) 
150
+  (0.1ms) SELECT sql
151
+ FROM sqlite_master
152
+ WHERE name='index_fe_elements_on_question_grid_id' AND type='index'
153
+ UNION ALL
154
+ SELECT sql
155
+ FROM sqlite_temp_master
156
+ WHERE name='index_fe_elements_on_question_grid_id' AND type='index'
157
+
158
+  (0.1ms)  SELECT sql
159
+ FROM sqlite_master
160
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
161
+ UNION ALL
162
+ SELECT sql
163
+ FROM sqlite_temp_master
164
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
165
+ 
166
+  (0.1ms) SELECT sql
167
+ FROM sqlite_master
168
+ WHERE name='index_fe_elements_on_slug' AND type='index'
169
+ UNION ALL
170
+ SELECT sql
171
+ FROM sqlite_temp_master
172
+ WHERE name='index_fe_elements_on_slug' AND type='index'
173
+
174
+  (0.1ms) CREATE INDEX "tindex_afe_elements_on_question_grid_id" ON "afe_elements" ("question_grid_id")
175
+  (0.1ms) SELECT sql
176
+ FROM sqlite_master
177
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
178
+ UNION ALL
179
+ SELECT sql
180
+ FROM sqlite_temp_master
181
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
182
+
183
+  (0.1ms) CREATE INDEX "tindex_afe_elements_on_conditional_id" ON "afe_elements" ("conditional_id")
184
+  (0.1ms) SELECT sql
185
+ FROM sqlite_master
186
+ WHERE name='tindex_afe_elements_on_conditional_id' AND type='index'
187
+ UNION ALL
188
+ SELECT sql
189
+ FROM sqlite_temp_master
190
+ WHERE name='tindex_afe_elements_on_conditional_id' AND type='index'
191
+
192
+  (0.1ms)  SELECT sql
193
+ FROM sqlite_master
194
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
195
+ UNION ALL
196
+ SELECT sql
197
+ FROM sqlite_temp_master
198
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
199
+ 
200
+  (0.1ms) CREATE INDEX "tindex_afe_elements_on_slug" ON "afe_elements" ("slug")
201
+  (0.1ms) SELECT * FROM "fe_elements"
202
+  (1.3ms) DROP TABLE "fe_elements"
203
+  (0.2ms) CREATE TABLE "fe_elements" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "question_grid_id" integer, "kind" varchar(40) NOT NULL, "style" varchar(40), "label" varchar(255), "content" text, "required" boolean, "slug" varchar(36), "position" integer, "object_name" varchar(255), "attribute_name" varchar(255), "source" varchar(255), "value_xpath" varchar(255), "text_xpath" varchar(255), "cols" varchar(255), "is_confidential" boolean DEFAULT 'f', "total_cols" varchar(255), "css_id" varchar(255), "css_class" varchar(255), "created_at" datetime, "updated_at" datetime, "related_question_sheet_id" integer, "conditional_id" integer, "tooltip" text, "hide_label" boolean DEFAULT 'f', "hide_option_labels" boolean DEFAULT 'f', "max_length" integer) 
204
+  (0.1ms) SELECT sql
205
+ FROM sqlite_master
206
+ WHERE name='tindex_afe_elements_on_slug' AND type='index'
207
+ UNION ALL
208
+ SELECT sql
209
+ FROM sqlite_temp_master
210
+ WHERE name='tindex_afe_elements_on_slug' AND type='index'
211
+
212
+  (0.1ms)  SELECT sql
213
+ FROM sqlite_master
214
+ WHERE name='tindex_afe_elements_on_conditional_id' AND type='index'
215
+ UNION ALL
216
+ SELECT sql
217
+ FROM sqlite_temp_master
218
+ WHERE name='tindex_afe_elements_on_conditional_id' AND type='index'
219
+ 
220
+  (0.1ms) SELECT sql
221
+ FROM sqlite_master
222
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
223
+ UNION ALL
224
+ SELECT sql
225
+ FROM sqlite_temp_master
226
+ WHERE name='tindex_afe_elements_on_question_grid_id' AND type='index'
227
+
228
+  (0.1ms) CREATE INDEX "index_fe_elements_on_slug" ON "fe_elements" ("slug")
229
+  (0.1ms) SELECT sql
230
+ FROM sqlite_master
231
+ WHERE name='index_fe_elements_on_slug' AND type='index'
232
+ UNION ALL
233
+ SELECT sql
234
+ FROM sqlite_temp_master
235
+ WHERE name='index_fe_elements_on_slug' AND type='index'
236
+
237
+  (0.2ms) CREATE INDEX "index_fe_elements_on_conditional_id" ON "fe_elements" ("conditional_id")
238
+  (0.1ms) SELECT sql
239
+ FROM sqlite_master
240
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
241
+ UNION ALL
242
+ SELECT sql
243
+ FROM sqlite_temp_master
244
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
245
+
246
+  (0.1ms)  SELECT sql
247
+ FROM sqlite_master
248
+ WHERE name='index_fe_elements_on_slug' AND type='index'
249
+ UNION ALL
250
+ SELECT sql
251
+ FROM sqlite_temp_master
252
+ WHERE name='index_fe_elements_on_slug' AND type='index'
253
+ 
254
+  (0.1ms) CREATE INDEX "index_fe_elements_on_question_grid_id" ON "fe_elements" ("question_grid_id")
255
+  (0.1ms) SELECT * FROM "afe_elements"
256
+  (0.4ms) DROP TABLE "afe_elements"
257
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131016162128"]]
258
+  (1.1ms) commit transaction
259
+ Migrating to CreateFePeople (20140623153424)
260
+  (0.0ms) begin transaction
261
+  (0.3ms) CREATE TABLE "fe_people" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar(255), "last_name" varchar(255), "user_id" integer, "is_staff" boolean, "created_at" datetime, "updated_at" datetime)
262
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140623153424"]]
263
+  (0.8ms) commit transaction
264
+ Migrating to CreateFeAddresses (20140624180246)
265
+  (0.0ms) begin transaction
266
+  (0.3ms) CREATE TABLE "fe_addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "startdate" datetime, "enddate" datetime, "address1" varchar(255), "address2" varchar(255), "address3" varchar(255), "address4" varchar(255), "address_type" varchar(255), "city" varchar(255), "state" varchar(255), "zip" varchar(255), "country" varchar(255), "person_id" integer, "created_at" datetime, "updated_at" datetime)
267
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140624180246"]]
268
+  (0.7ms) commit transaction
269
+ Migrating to CreateCreateFePhoneNumbers (20140624182216)
270
+  (0.0ms) begin transaction
271
+  (0.3ms) CREATE TABLE "create_fe_phone_numbers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "number" varchar(255), "extensions" varchar(255), "person_id" integer, "location" varchar(255), "primary" boolean, "txt_to_email" varchar(255), "carrier_id" integer, "email_updated_at" datetime, "created_at" datetime, "updated_at" datetime)
272
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140624182216"]]
273
+  (0.7ms) commit transaction
274
+ Migrating to CreateFeUsers (20140625160545)
275
+  (0.0ms) begin transaction
276
+  (0.3ms) CREATE TABLE "fe_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "last_login" datetime, "type" varchar(255), "role" varchar(255), "created_at" datetime, "updated_at" datetime)
277
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140625160545"]]
278
+  (1.0ms) commit transaction
279
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
280
+  (0.1ms) SELECT sql
281
+ FROM sqlite_master
282
+ WHERE name='answer_sheet_question_sheet' AND type='index'
283
+ UNION ALL
284
+ SELECT sql
285
+ FROM sqlite_temp_master
286
+ WHERE name='answer_sheet_question_sheet' AND type='index'
287
+
288
+  (0.1ms)  SELECT sql
289
+ FROM sqlite_master
290
+ WHERE name='answer_sheet_question' AND type='index'
291
+ UNION ALL
292
+ SELECT sql
293
+ FROM sqlite_temp_master
294
+ WHERE name='answer_sheet_question' AND type='index'
295
+ 
296
+  (0.1ms) SELECT sql
297
+ FROM sqlite_master
298
+ WHERE name='index_fe_answers_on_short_value' AND type='index'
299
+ UNION ALL
300
+ SELECT sql
301
+ FROM sqlite_temp_master
302
+ WHERE name='index_fe_answers_on_short_value' AND type='index'
303
+
304
+  (0.1ms)  SELECT sql
305
+ FROM sqlite_master
306
+ WHERE name='question_sheet_id' AND type='index'
307
+ UNION ALL
308
+ SELECT sql
309
+ FROM sqlite_temp_master
310
+ WHERE name='question_sheet_id' AND type='index'
311
+ 
312
+  (0.1ms) SELECT sql
313
+ FROM sqlite_master
314
+ WHERE name='index_fe_conditions_on_toggle_id' AND type='index'
315
+ UNION ALL
316
+ SELECT sql
317
+ FROM sqlite_temp_master
318
+ WHERE name='index_fe_conditions_on_toggle_id' AND type='index'
319
+
320
+  (0.1ms)  SELECT sql
321
+ FROM sqlite_master
322
+ WHERE name='index_fe_conditions_on_toggle_page_id' AND type='index'
323
+ UNION ALL
324
+ SELECT sql
325
+ FROM sqlite_temp_master
326
+ WHERE name='index_fe_conditions_on_toggle_page_id' AND type='index'
327
+ 
328
+  (0.1ms) SELECT sql
329
+ FROM sqlite_master
330
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
331
+ UNION ALL
332
+ SELECT sql
333
+ FROM sqlite_temp_master
334
+ WHERE name='index_fe_conditions_on_trigger_id' AND type='index'
335
+
336
+  (0.1ms)  SELECT sql
337
+ FROM sqlite_master
338
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
339
+ UNION ALL
340
+ SELECT sql
341
+ FROM sqlite_temp_master
342
+ WHERE name='index_fe_conditions_on_question_sheet_id' AND type='index'
343
+ 
344
+  (0.2ms) SELECT sql
345
+ FROM sqlite_master
346
+ WHERE name='index_fe_elements_on_question_grid_id' AND type='index'
347
+ UNION ALL
348
+ SELECT sql
349
+ FROM sqlite_temp_master
350
+ WHERE name='index_fe_elements_on_question_grid_id' AND type='index'
351
+
352
+  (0.1ms)  SELECT sql
353
+ FROM sqlite_master
354
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
355
+ UNION ALL
356
+ SELECT sql
357
+ FROM sqlite_temp_master
358
+ WHERE name='index_fe_elements_on_conditional_id' AND type='index'
359
+ 
360
+  (0.1ms) SELECT sql
361
+ FROM sqlite_master
362
+ WHERE name='index_fe_elements_on_slug' AND type='index'
363
+ UNION ALL
364
+ SELECT sql
365
+ FROM sqlite_temp_master
366
+ WHERE name='index_fe_elements_on_slug' AND type='index'
367
+
368
+  (0.1ms)  SELECT sql
369
+ FROM sqlite_master
370
+ WHERE name='page_element' AND type='index'
371
+ UNION ALL
372
+ SELECT sql
373
+ FROM sqlite_temp_master
374
+ WHERE name='page_element' AND type='index'
375
+ 
376
+  (0.1ms) SELECT sql
377
+ FROM sqlite_master
378
+ WHERE name='index_fe_references_on_applicant_answer_sheet_id' AND type='index'
379
+ UNION ALL
380
+ SELECT sql
381
+ FROM sqlite_temp_master
382
+ WHERE name='index_fe_references_on_applicant_answer_sheet_id' AND type='index'
383
+
384
+  (0.1ms)  SELECT sql
385
+ FROM sqlite_master
386
+ WHERE name='index_fe_references_on_question_id' AND type='index'
387
+ UNION ALL
388
+ SELECT sql
389
+ FROM sqlite_temp_master
390
+ WHERE name='index_fe_references_on_question_id' AND type='index'
391
+ 
392
+  (0.1ms) begin transaction
393
+ SQL (1.1ms) INSERT INTO "fe_elements" ("content", "created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "abc"], ["created_at", "2014-08-03 19:32:12.037578"], ["kind", "Fe::Paragraph"], ["style", "paragraph"], ["updated_at", "2014-08-03 19:32:12.037578"]]
394
+  (0.8ms) commit transaction
395
+  (0.0ms) begin transaction
396
+ SQL (0.2ms) INSERT INTO "fe_elements" ("content", "created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Lorem ipsum..."], ["created_at", "2014-08-03 19:32:12.054761"], ["kind", "Fe::Paragraph"], ["style", "paragraph"], ["updated_at", "2014-08-03 19:32:12.054761"]]
397
+  (0.7ms) commit transaction
398
+  (0.0ms) begin transaction
399
+ SQL (0.3ms) INSERT INTO "fe_elements" ("created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-08-03 19:32:12.058179"], ["kind", "Fe::ReferenceQuestion"], ["style", "peer"], ["updated_at", "2014-08-03 19:32:12.058179"]]
400
+  (0.7ms) commit transaction
401
+  (0.1ms) begin transaction
402
+ SQL (0.3ms) INSERT INTO "fe_elements" ("created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-08-03 19:32:12.073637"], ["kind", "Fe::ReferenceQuestion"], ["style", "peer"], ["updated_at", "2014-08-03 19:32:12.073637"]]
403
+  (0.8ms) commit transaction
404
+  (0.0ms) begin transaction
405
+ SQL (1.4ms) INSERT INTO "fe_answer_sheet_question_sheets" ("created_at", "question_sheet_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-08-03 19:32:12.090424"], ["question_sheet_id", 1], ["updated_at", "2014-08-03 19:32:12.090424"]]
406
+ SQL (2.6ms) INSERT INTO "fe_applications" ("applicant_id", "created_at", "status", "updated_at") VALUES (?, ?, ?, ?) [["applicant_id", 1], ["created_at", "2014-08-03 19:32:12.080491"], ["status", "started"], ["updated_at", "2014-08-03 19:32:12.080491"]]
407
+ SQL (0.1ms) UPDATE "fe_answer_sheet_question_sheets" SET "answer_sheet_id" = ?, "updated_at" = ? WHERE "fe_answer_sheet_question_sheets"."id" = 1 [["answer_sheet_id", 1], ["updated_at", "2014-08-03 19:32:12.096813"]]
408
+  (1.0ms) commit transaction
409
+  (0.0ms) begin transaction
410
+ SQL (0.3ms) INSERT INTO "fe_elements" ("created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-08-03 19:32:12.100654"], ["kind", "Fe::DateField"], ["style", "date"], ["updated_at", "2014-08-03 19:32:12.100654"]]
411
+  (0.7ms) commit transaction
412
+  (0.1ms) begin transaction
413
+ SQL (1.6ms) INSERT INTO "fe_answers" ("answer_sheet_id", "created_at", "question_id", "updated_at", "value") VALUES (?, ?, ?, ?, ?) [["answer_sheet_id", 1], ["created_at", "2014-08-03 19:32:12.116263"], ["question_id", 5], ["updated_at", "2014-08-03 19:32:12.116263"], ["value", "13/12/2013"]]
414
+  (1.0ms) commit transaction
415
+ Fe::Answer Load (0.2ms) SELECT "fe_answers".* FROM "fe_answers" WHERE "fe_answers"."answer_sheet_id" = 1 AND "fe_answers"."question_id" = 5 ORDER BY "fe_answers"."id" ASC LIMIT 1
416
+  (0.1ms) begin transaction
417
+ SQL (0.3ms) INSERT INTO "fe_answer_sheet_question_sheets" ("created_at", "question_sheet_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-08-03 19:32:12.129844"], ["question_sheet_id", 1], ["updated_at", "2014-08-03 19:32:12.129844"]]
418
+ SQL (0.1ms) INSERT INTO "fe_applications" ("applicant_id", "created_at", "status", "updated_at") VALUES (?, ?, ?, ?) [["applicant_id", 1], ["created_at", "2014-08-03 19:32:12.129403"], ["status", "started"], ["updated_at", "2014-08-03 19:32:12.129403"]]
419
+ SQL (0.1ms) UPDATE "fe_answer_sheet_question_sheets" SET "answer_sheet_id" = ?, "updated_at" = ? WHERE "fe_answer_sheet_question_sheets"."id" = 2 [["answer_sheet_id", 2], ["updated_at", "2014-08-03 19:32:12.131310"]]
420
+  (0.9ms) commit transaction
421
+  (0.0ms) begin transaction
422
+ SQL (0.2ms) INSERT INTO "fe_elements" ("created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-08-03 19:32:12.133436"], ["kind", "Fe::DateField"], ["style", "date"], ["updated_at", "2014-08-03 19:32:12.133436"]]
423
+  (0.8ms) commit transaction
424
+  (0.0ms) begin transaction
425
+ SQL (0.2ms) INSERT INTO "fe_answers" ("answer_sheet_id", "created_at", "question_id", "updated_at", "value") VALUES (?, ?, ?, ?, ?) [["answer_sheet_id", 2], ["created_at", "2014-08-03 19:32:12.135714"], ["question_id", 6], ["updated_at", "2014-08-03 19:32:12.135714"], ["value", "2014-08-03 19:32:12.135056"]]
426
+  (0.8ms) commit transaction
427
+ Fe::Answer Load (0.1ms) SELECT "fe_answers".* FROM "fe_answers" WHERE "fe_answers"."answer_sheet_id" = 2 AND "fe_answers"."question_id" = 6 ORDER BY "fe_answers"."id" ASC LIMIT 1
428
+ Fe::Answer Load (0.1ms) SELECT "fe_answers".* FROM "fe_answers" WHERE "fe_answers"."id" = ? LIMIT 1 [["id", 2]]
429
+  (0.0ms) begin transaction
430
+ SQL (0.2ms) INSERT INTO "fe_answer_sheet_question_sheets" ("created_at", "question_sheet_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-08-03 19:32:12.140256"], ["question_sheet_id", 1], ["updated_at", "2014-08-03 19:32:12.140256"]]
431
+ SQL (0.1ms) INSERT INTO "fe_applications" ("applicant_id", "created_at", "status", "updated_at") VALUES (?, ?, ?, ?) [["applicant_id", 1], ["created_at", "2014-08-03 19:32:12.139941"], ["status", "started"], ["updated_at", "2014-08-03 19:32:12.139941"]]
432
+ SQL (0.1ms) UPDATE "fe_answer_sheet_question_sheets" SET "answer_sheet_id" = ?, "updated_at" = ? WHERE "fe_answer_sheet_question_sheets"."id" = 3 [["answer_sheet_id", 3], ["updated_at", "2014-08-03 19:32:12.141506"]]
433
+  (0.9ms) commit transaction
434
+  (0.0ms) begin transaction
435
+ SQL (0.2ms) INSERT INTO "fe_elements" ("created_at", "kind", "style", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-08-03 19:32:12.143537"], ["kind", "Fe::DateField"], ["style", "date"], ["updated_at", "2014-08-03 19:32:12.143537"]]
436
+  (0.8ms) commit transaction
437
+  (0.0ms) begin transaction
438
+ SQL (0.2ms) INSERT INTO "fe_answers" ("answer_sheet_id", "created_at", "question_id", "updated_at", "value") VALUES (?, ?, ?, ?, ?) [["answer_sheet_id", 3], ["created_at", "2014-08-03 19:32:12.145791"], ["question_id", 7], ["updated_at", "2014-08-03 19:32:12.145791"], ["value", "1/12/2013"]]
439
+  (0.8ms) commit transaction
440
+ Fe::Answer Load (0.1ms) SELECT "fe_answers".* FROM "fe_answers" WHERE "fe_answers"."answer_sheet_id" = 3 AND "fe_answers"."question_id" = 7 ORDER BY "fe_answers"."id" ASC LIMIT 1