Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.18 KB | None | 0 0
  1. # This file should contain all the record creation needed to seed the database with its default values.
  2. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  3. #
  4. # Examples:
  5. #
  6. # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
  7. # Mayor.create(name: 'Emanuel', city: cities.first)
  8.  
  9. admin = Employee.create!([{
  10. is_admin: true,
  11. first_name: "Kenneth",
  12. last_name: "The Paige",
  13. email: "test@example.com",
  14. password: "12345678",
  15. password_confirmation: "12345678",
  16. address_attributes:
  17. {
  18. street_address: "123 Chuckleburger drive",
  19. city: "New York",
  20. state: "NY",
  21. zip: "00001"
  22. },
  23. primary_phone_attributes:
  24. {
  25. area_code: "111",
  26. number: "555-1212"
  27. },
  28. secondary_phone_attributes:
  29. {
  30. area_code: "111",
  31. number: "555-2121"
  32. },
  33. primary_fax_attributes:
  34. {
  35. area_code: "111",
  36. number: "555-2100"
  37. }
  38. }])
  39.  
  40. residents = Resident.create!([{
  41. employee_id: 1,
  42. first_name: "bob",
  43. last_name: "hope",
  44. dob: "#{Date.today - 43}",
  45. marital_status: "Married",
  46. religious_preferences: "none",
  47. insurance_info: "medicaid",
  48. veteran_status_number: "123-090",
  49. burial_provisions: "cremation",
  50. admission_weight: "164 lbs",
  51. admission_height: "5ft 9in", allergies: "none",
  52. address_attributes:
  53. {
  54. street_address: "53 birdies way",
  55. city: "palm springs",
  56. state: "ca",
  57. zip: "99009"
  58. },
  59. primary_phone_attributes:
  60. {
  61. area_code: "123",
  62. number: "555-2947"
  63. },
  64. secondary_phone_attributes:
  65. {
  66. area_code: "123",
  67. number: "555-0213"
  68. },
  69. primary_fax_attributes:
  70. {
  71. area_code: "123",
  72. number: "555-9000"
  73. },
  74. doctor_attributes:
  75. {
  76. first_name: "leo",
  77. last_name: "spaceman",
  78. email: "spaceman@example.com",
  79. start_date: "#{Date.today - 28}",
  80. end_date: "",
  81. address_attributes:
  82. {
  83. street_address: "30 Rockefeller Center Plaza",
  84. city: "new York",
  85. state: "ny",
  86. zip: "00001"
  87. },
  88. primary_phone_attributes:
  89. {
  90. area_code: "111",
  91. number: "555-1000"
  92. },
  93. secondary_phone_attributes:
  94. {
  95. area_code: "111",
  96. number: "555-1001"
  97. },
  98. primary_fax_attributes:
  99. {
  100. area_code: "111",
  101. number: "555-1111"
  102. }
  103. },
  104. designated_representative_attributes:
  105. {
  106. first_name: "willie",
  107. last_name: "wilkonson",
  108. email: "willy_desrep@example.com",
  109. address_attributes:
  110. {
  111. street_address: "85891 hwy 22",
  112. city: "flint",
  113. state: "mi",
  114. zip: "48785"
  115. },
  116. primary_phone_attributes:
  117. {
  118. area_code: "111",
  119. number: "423-9876"
  120. },
  121. secondary_phone_attributes:
  122. {
  123. area_code: "111",
  124. number: "668-0948"
  125. },
  126. primary_fax_attributes:
  127. {
  128. area_code: "111",
  129. number: "423-9000"
  130. }
  131. },
  132. guardian_attributes:
  133. {
  134. first_name: "bob",
  135. last_name: "steele",
  136. email: "guardian_bob@example.com",
  137. address_attributes:
  138. {
  139. street_address: "8472 Hickabilly terrace",
  140. city: "flint",
  141. state: "mi",
  142. zip: "47463"
  143. },
  144. primary_phone_attributes:
  145. {
  146. area_code: "998",
  147. number: "897-5617"
  148. },
  149. secondary_phone_attributes:
  150. {
  151. area_code: "998",
  152. number: "897-5618"
  153. },
  154. primary_fax_attributes:
  155. {
  156. area_code: "998",
  157. number: "897-5600"
  158. },
  159. },
  160. hospital_attributes:
  161. {
  162. name: "hurley",
  163. email: "hurley@example.com",
  164. address_attributes:
  165. {
  166. street_address: "554 medical center drive",
  167. city: "flint",
  168. state: "mi",
  169. zip: "48705"
  170. },
  171. primary_phone_attributes:
  172. {
  173. area_code: "810",
  174. number: "555-6600"
  175. },
  176. secondary_phone_attributes:
  177. {
  178. area_code: "810",
  179. number: "555-6500"
  180. },
  181. primary_fax_attributes:
  182. {
  183. area_code: "810",
  184. number: "555-6000"
  185. }
  186. },
  187. primary_emergency_contact_attributes:
  188. {
  189. first_name: "jethro",
  190. last_name: "lippincot",
  191. email: "lippinro86@example.com",
  192. address_attributes:
  193. {
  194. street_address: "19 willowbranch trail",
  195. city: "flint",
  196. state: "mi",
  197. zip: "46685"
  198. },
  199. primary_phone_attributes:
  200. {
  201. area_code: "810",
  202. number: "767-9209"
  203. },
  204. secondary_phone_attributes:
  205. {
  206. area_code: "810",
  207. number: "767-0951"
  208. },
  209. primary_fax_attributes:
  210. {
  211. area_code: "810",
  212. number: "767-9200"
  213. }
  214. },
  215. secondary_emergency_contact_attributes:
  216. {
  217. first_name: "liquinta",
  218. last_name: "henderson",
  219. email: "qqhenderson@example.com",
  220. address_attributes:
  221. {
  222. street_address: "4429 open platts circle",
  223. city: "flint",
  224. state: "mi",
  225. zip: "58932"
  226. },
  227. primary_phone_attributes:
  228. {
  229. area_code: "989",
  230. number: "798-4326"
  231. },
  232. secondary_phone_attributes:
  233. {
  234. area_code: "989",
  235. number: "340-5896"
  236. },
  237. primary_fax_attributes:
  238. {
  239. area_code: "989",
  240. number: "340-0909"
  241. },
  242. }
  243. }])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement