dynamic-fields-for 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. data/README.md +4 -1
  2. data/lib/dynamic-fields-for/version.rb +1 -1
  3. data/spec/features/dynamic_fields_for_spec.rb +110 -0
  4. data/spec/fixtures/roles.yml +11 -0
  5. data/spec/fixtures/users.yml +2 -0
  6. data/spec/rails_app/Rakefile +6 -0
  7. data/spec/rails_app/app/assets/javascripts/application.coffee +13 -0
  8. data/spec/rails_app/app/controllers/application_controller.rb +5 -0
  9. data/spec/rails_app/app/controllers/users_controller.rb +38 -0
  10. data/spec/rails_app/app/models/role.rb +5 -0
  11. data/spec/rails_app/app/models/user.rb +7 -0
  12. data/spec/rails_app/app/views/layouts/application.html.haml +7 -0
  13. data/spec/rails_app/app/views/users/_form.html.haml +23 -0
  14. data/spec/rails_app/app/views/users/edit.html.haml +1 -0
  15. data/spec/rails_app/app/views/users/edit_without_fields.html.haml +6 -0
  16. data/spec/rails_app/app/views/users/events.html.haml +13 -0
  17. data/spec/rails_app/app/views/users/new.html.haml +1 -0
  18. data/spec/rails_app/bin/bundle +3 -0
  19. data/spec/rails_app/bin/rails +4 -0
  20. data/spec/rails_app/bin/rake +4 -0
  21. data/spec/rails_app/config/application.rb +28 -0
  22. data/spec/rails_app/config/boot.rb +10 -0
  23. data/spec/rails_app/config/database.yml +24 -0
  24. data/spec/rails_app/config/environment.rb +7 -0
  25. data/spec/rails_app/config/environments/development.rb +37 -0
  26. data/spec/rails_app/config/environments/production.rb +80 -0
  27. data/spec/rails_app/config/environments/test.rb +41 -0
  28. data/spec/rails_app/config/initializers/assets.rb +8 -0
  29. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  30. data/spec/rails_app/config/initializers/cookies_serializer.rb +3 -0
  31. data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  32. data/spec/rails_app/config/initializers/inflections.rb +16 -0
  33. data/spec/rails_app/config/initializers/mime_types.rb +4 -0
  34. data/spec/rails_app/config/initializers/secret_token.rb +5 -0
  35. data/spec/rails_app/config/initializers/session_store.rb +3 -0
  36. data/spec/rails_app/config/initializers/simple_form.rb +166 -0
  37. data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
  38. data/spec/rails_app/config/locales/en/simple_form.yml +31 -0
  39. data/spec/rails_app/config/routes.rb +8 -0
  40. data/spec/rails_app/config.ru +4 -0
  41. data/spec/rails_app/db/development.sqlite3 +0 -0
  42. data/spec/rails_app/db/migrate/001_create_tables.rb +12 -0
  43. data/spec/rails_app/db/schema.rb +25 -0
  44. data/spec/rails_app/db/test.sqlite3 +0 -0
  45. data/spec/rails_app/log/development.log +1974 -0
  46. data/spec/rails_app/log/test.log +6152 -0
  47. data/spec/rails_app/public/404.html +67 -0
  48. data/spec/rails_app/public/422.html +67 -0
  49. data/spec/rails_app/public/500.html +66 -0
  50. data/spec/rails_app/public/favicon.ico +0 -0
  51. data/spec/rails_app/script/rails +6 -0
  52. data/spec/rails_app/tmp/cache/assets/C51/770/sprockets%2F65b30e4019e7912b6d5468049a3225f7 +0 -0
  53. data/spec/rails_app/tmp/cache/assets/CB0/C90/sprockets%2F282f835b9033d34d7f393ec15418ea50 +0 -0
  54. data/spec/rails_app/tmp/cache/assets/CD3/D40/sprockets%2F4d69456240020b937e2ebc9c6a60e13a +0 -0
  55. data/spec/rails_app/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  56. data/spec/rails_app/tmp/cache/assets/CE1/160/sprockets%2F1ea763129b82d9251ca608145dc86ed7 +0 -0
  57. data/spec/rails_app/tmp/cache/assets/CE3/590/sprockets%2F60f1e97d7008b3ed41f72855a4228bb9 +0 -0
  58. data/spec/rails_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
  59. data/spec/rails_app/tmp/cache/assets/CF9/2E0/sprockets%2F67796127ee81f4ec16ee9396fb48b045 +0 -0
  60. data/spec/rails_app/tmp/cache/assets/D13/070/sprockets%2F3ef994e7d6b14666124b063ac9490afa +0 -0
  61. data/spec/rails_app/tmp/cache/assets/D23/B10/sprockets%2Fc2a831ed79df487d6485a5c9c52766c2 +0 -0
  62. data/spec/rails_app/tmp/cache/assets/D32/080/sprockets%2F1548a52bba44f491b7240acb85fdb481 +0 -0
  63. data/spec/rails_app/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  64. data/spec/rails_app/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  65. data/spec/rails_app/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  66. data/spec/rails_app/tmp/cache/assets/D74/A30/sprockets%2Fd6c9f9b2ca876229f263f68006bac0dd +0 -0
  67. data/spec/rails_app/tmp/cache/assets/D75/B20/sprockets%2Fb6826ab2b21df7d87c4b74d429e4e44f +0 -0
  68. data/spec/rails_app/tmp/cache/assets/D77/5C0/sprockets%2F42bf4dd0668fe6fe799a4ba6aa424842 +0 -0
  69. data/spec/rails_app/tmp/cache/assets/DA8/F20/sprockets%2Fd8e6aa7805f1851a6b8ba9e4fc722d7e +0 -0
  70. data/spec/rails_app/tmp/cache/assets/DAA/450/sprockets%2F3df09fe42da429dae5b629e74b6684eb +0 -0
  71. data/spec/rails_app/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  72. data/spec/rails_app/tmp/cache/assets/DE9/260/sprockets%2Fadd025ab0eb13a6d4180af43d5df39df +0 -0
  73. data/spec/rails_app/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  74. data/spec/rails_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
  75. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/005NbUmrcPP7BE5ewSp7_ZgR35fy0DC7Zj9ZRwk0MjU.cache +1 -0
  76. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/0twwP-f_pWyvsnE2frKwn25KXXJpg8zSSZjZfhh-W0U.cache +1 -0
  77. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/2STghpkswLWuQb3JJm4u_5kHhdV1Z7Q9V3Vcs4g2Kxk.cache +1 -0
  78. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/35OsSiLOQQXvPwILhNj7TJXVSISbaxJZpzlXryTODyI.cache +1 -0
  79. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/3Ml8X3oHdLRvYIm3Z2bgq0ErAO9DIIdfufZY6xxk_bQ.cache +1 -0
  80. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/4LYhxnvRwaLlxyh9dZBFFu_aFKV14A4A29s9Lq5fwvY.cache +1 -0
  81. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/4dc5iDYQvyTr6_AqdtY_IXkO4H9e_vCk3MfzuPYLzIs.cache +0 -0
  82. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/4s7JRTGpFUHEvdJ0smvNRYzvYLC4ci69YJec-_WSXeM.cache +1 -0
  83. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/5F4sE-a_Yct4eSGFf4CokFK8XFC9VuEqIfkLIVbh7d4.cache +0 -0
  84. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/6GBEq8wOlNbljaEO0IaAuPp9IM7noU4smItOxz75Bgw.cache +0 -0
  85. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/6kWtg2dd7QHHGFFcYERN6y1S3C0bE6obDD4Y8NjDt28.cache +0 -0
  86. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/70Ys2Sg3IKtBLiqlZI5EjjvMa-v_hO7AIwTN6axW6uw.cache +1 -0
  87. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/75_YNF40pq9Qdkjb4voDXxU-fdYHh8eOcBqQSc0wACY.cache +1 -0
  88. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7T9A3AvzA227hFMUlf1cnCmXMNZ--yzeUeFU_qH5UCk.cache +1 -0
  89. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7WYjScyAmZLKfnnwGLoGxILffqhTkJ5whgbQW2vXXLU.cache +1 -0
  90. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7p8BcHcUjuqzaQ_g-5p1N1Iv5fcXMHTy6HNVZJ3chUE.cache +0 -0
  91. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7tbYhX9PH2B3B17ie9lEUsRZLwf7QxRb5YfjedEkslM.cache +1 -0
  92. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/8WvFXwwHBNQ0Jn0Ft4jscXDq2vYDQtD0-lwweW4Ewg0.cache +1 -0
  93. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/8iWifo1VXYAo1y6HIpaCHVdTFi1Uxzf2cFcmiIEpYm0.cache +1 -0
  94. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/8pWBvOy6jzO_x3j5oaNZGXDybMcNFyn0QeEH3P9JiVY.cache +1 -0
  95. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/9CVm97VXM_R6nB8AyUWv0-mg9VUJ0ZBHMqzp3z6KBYA.cache +0 -0
  96. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/9I5eCEXaP_dUa_-i0SJBd-73ZtOqDMzUKhCkunl0n00.cache +1 -0
  97. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/9u5shJpSGH2XNK6oc2tyXrKH-nIABVI0WQo63n_DV68.cache +1 -0
  98. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/APwRGcTfA0EvBNVnRA6s1LBjwfzZPYC7-D404VhaGQo.cache +1 -0
  99. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/BPmQpDrJX8wo4YdpP2hflzYrb1KMb_8Zgzvmj6FVOGo.cache +1 -0
  100. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/C8__sPir_zLB1skjvzJUuRf9rjvsi3NH5WzAuoBRRBo.cache +1 -0
  101. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/CPC0lA-4Cx2FueL1tlquWe9Qgrf0eUCwOXTXgSDhEyg.cache +1 -0
  102. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/EePrH9vcnM8XjJ0yQkKhABpQ1-9yl1cp2vWKIOaPXDA.cache +1 -0
  103. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/FzbQ2YTgQvuZHn8zoRc4vKkMjL-A5ly_3uG_wrDCxSk.cache +1 -0
  104. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/HYrqPvTHZRmN1vmImSXSmdlqyBGdVTcR6_6MfxpgmZA.cache +0 -0
  105. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/N7nvgHzVHCNMm1iI-aSla1en7KWBZKXq4-vV91Ak29Y.cache +0 -0
  106. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/NIffjSjf2211qbWt1ceMD8h4CV93DTYxhIvFMTVibWY.cache +0 -0
  107. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/NVi1CCiylchuiWliA9pmeoQ61pCKqExfBnHng7eOZqA.cache +1 -0
  108. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/P-NPHOYBfhzg_4wEYB32fn9z7qwf_5kP-DNW_STmm7M.cache +1 -0
  109. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/PIner30XxGVbJth5pdG2X8xdzwP3m-z6yjUTxibsEpQ.cache +1 -0
  110. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/QnxsUWeU6C0G5IDcyjmKYnWIObQWTj96h56A1wd2_TE.cache +1 -0
  111. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/R3fK1lyD12pPiMXAOSZ0hJwdm98o7ROhIGiyeZt64x8.cache +1 -0
  112. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/RLRDP3vBQ-TZ151Q1PfGmvtS57-a6IU2OG2Fz-7kpKk.cache +0 -0
  113. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/RzDmtYfK-3P-j2HtoIzPzkA8WN4Kxj9t-wGVLYXzmDI.cache +0 -0
  114. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/UHazTCAIgk3ECaf5Z5rD74SpvBKID2z4T5Yz2sNhJW8.cache +1 -0
  115. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/U_PFdfoUOZdxkfhOcXk6pyc4lrfjw7srrwJYPmA0Cn4.cache +1 -0
  116. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Uu4IjUcxuCDWTcNTYDNrOXYaiL-8_D481kJRUscoFS0.cache +0 -0
  117. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/V10JbcfuvpND2sCUgc1bp_v-VWWyZDeNBByADCmjIEE.cache +0 -0
  118. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/VOE1H9GohyBJmS1FZZz5p7NioZERmuTdQ3llfsKaVj4.cache +0 -0
  119. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Vgg1kG1-YyvEmYnt8OSe_49LZ5Fg-detSj7RIkyJKlE.cache +1 -0
  120. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/WJQcBxjCmjJAWRnGIQv9VBTRRKEHih6jscnJd70cW50.cache +1 -0
  121. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Wt_OTU0ay_WUYP4kutzOv-RU-rsRnz-JeHhfoXYMJ4k.cache +7 -0
  122. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/X2ViGEX5fWUM52RHJNXyREchayzNWouJusvCfXn0l9U.cache +1 -0
  123. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/XU7rm1nzQx98s-b6a_806KG7jWFIKu8F_sp0gdHN64M.cache +1 -0
  124. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/YqiuB7JK-d4oRQXC7SRMiF3nkFIIsfJCO1zKK0QvjLw.cache +1 -0
  125. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Zf0GdHeOqOcmQsZyaIR1bq7A58iYXRxF7RgSki0xP-8.cache +1 -0
  126. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/_93TpShhCNwNSN2ABi0sJ8TkPmWKIjLMqcBQHx6W9S8.cache +1 -0
  127. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/a2agfZXZEGSSrlwjd25j16UvmcOWDSEy4mKEbtbYaMk.cache +0 -0
  128. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/a_PdN5dDYMZBxAJkDXdM5vte80OAEp3ATJ1FBwUORUE.cache +2 -0
  129. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/bH71seiu5IgIEswdHw0MxVy2Bft5eTYq7p-J1z2wLSE.cache +1 -0
  130. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/bogDcwpJOnH2EGTPI4BxRTFiwgu0XlxSjUkRdPKRUZI.cache +1 -0
  131. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/cL9X5KmjWqJPT1xI5vqEKFOFSsU-pAuV9geay4MpcwY.cache +1 -0
  132. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/cadxJIIj0tKH4iw91XcKK05eJV8slB_EY1xg4bWHtHY.cache +0 -0
  133. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/cmyPm4CQjK0SGdGAiRQUzSkDzxVC11Cbfe0mwbABnmQ.cache +0 -0
  134. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/d5GSxDUScnoThcT7LMLFwveRhg2-8HTpPiwHKyEFKGg.cache +1 -0
  135. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/d6I4qa3D5aXShq60xuXBXFuB-PCwrhngr8EY6SpyXHw.cache +1 -0
  136. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fPKkbDzIVlpaAD07gmsUzq3db1tAmEG6BY6UWN2Tq0U.cache +0 -0
  137. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fmdRPsW3PlR3rbBrsmbauRYUvGi1nwCOTqVWRpLIl2M.cache +0 -0
  138. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fpWADUS8B7ozjxM4OES8daY5S8Mj6eZ8OqoQ7fNXXUo.cache +1 -0
  139. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/hFbp9B-T1BhYYVTUE-NENpiN2vQ0A-EEJP3yfEv8voM.cache +0 -0
  140. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/jUUbGZ-kWFdNm7cZdBNf0xyQfV-zwp-dUHfdRAuzR4s.cache +0 -0
  141. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/jgg7MjH1YLNuXXB9jSxo7BLHBPMH_QiCxp97M-gRqlE.cache +0 -0
  142. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/jrrOV55Sf9U41wQOifQ570NtUW4H1pBEePlEzujLzAU.cache +1 -0
  143. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/jx9EjyhQ77RJR0mnbwmjJBxZ3Ye3rTnHXyl07tR8gTs.cache +1 -0
  144. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/k5POkyE0JUCcc3gsZOC5c9o6vE3tnR6ilmw5H69LVU0.cache +1 -0
  145. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/l6V2CBOV-G8JXoy2eTfw0ER4Axb6GH8hBAW9v1nC4OU.cache +0 -0
  146. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mKQKN_P_8jYD-Q80hhjvo4e3LImaXAMIThYLqa9Apvw.cache +0 -0
  147. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mLgvD_7crCEElvOJAJHYfAMAgazVUaW2Uy6ClPvvWJ4.cache +1 -0
  148. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mmKtMm4yY2EunJnNTqzT16Aikkg9c1ooLZ5kB0G4veI.cache +0 -0
  149. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/moaVwgLL6aVHUB2iWMenrou9mOYZdBaZn8j1k80p3AA.cache +0 -0
  150. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/naD1x6gn7SYJheSsI6aU_d3A7acFzAkkDsqygZLfZao.cache +1 -0
  151. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/pR0WZ_QziFmGR5DXpU5gUtK1Nfm1X2R9nmSin9jrBHI.cache +0 -0
  152. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/pcUsSlhbu4BvVzOmOCppHGIlPZndwbKDrsMfgQCYDqY.cache +1 -0
  153. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/peIPXIKPOMS3DBXLoSQr95J9ty327Um0vUgLbITJc9g.cache +0 -0
  154. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/pjo0jiZFzHD001Trck4zXHfXwSlZkBjEDcdy-aT_0Aw.cache +2 -0
  155. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/q6Q5iVuKHhUgLzQY3g42H2AATl06s2304_8Pzvnn3pc.cache +1 -0
  156. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/qPjyW0sqKLF_koGEYacxrcwWU60QCfFEwfVXStO1K3I.cache +0 -0
  157. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/rERbnOR49nHBQRnB7kg5PNLQNrhjIHYLi9NEkAk2J7A.cache +0 -0
  158. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/rgOibJhx1nDmCTnIoK7GhJwkSdQIlLQLriJEb-vanl8.cache +1 -0
  159. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/sKRDBhQlKek8nivOEE3iPkWez_DH1UGxtC-96IarWwI.cache +0 -0
  160. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/sZn_c8hNOrnxaQ8Yy3kgXGzy54WUSQLCoe7VSshR9RM.cache +1 -0
  161. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/staSd6rFktYlRt4U_rjmXSqK_cKairudXroMSjwWF-o.cache +1 -0
  162. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/u1_AVk2lrCxTujtkKbM-hX8pFnK-J_in5rv3CoQ0BD0.cache +1 -0
  163. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ve5ms89UU4CYIorG9tJTHApqsVbcxrjZbVjhS0b0vPI.cache +0 -0
  164. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/vgmfFTzFMwf1hhMw3aul1kts_CSWnqoUVnM75IgOq5g.cache +2 -0
  165. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wA4UMsI884mrDsixUCmN_u_m80rsWqGJW659dMTvYWc.cache +0 -0
  166. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wMnnRgv2KHXeZicLBCT41V9Twf3Ws9OT42KMvo7Brts.cache +0 -0
  167. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wO-8RVLVju09jwLXUEfJhYt9gGIUU8xZ8QQJvlvgA98.cache +1 -0
  168. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wbhGIsb6sUjFuFyZAFKMhr_QqVUqphS6kt-hwpkpyN0.cache +1 -0
  169. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wsTMfLbj2DGVQ9_iTFLS4nHX0IQBRJUhxpusR9e82AY.cache +1 -0
  170. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wukuVHgoW7ddJHSkoaJz1TxDX1BuchCVzwCRHwD8RYE.cache +1 -0
  171. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/xT9aSUCXI9_uo2DpiU0FvOG4p4O9y5PQgJo9Y3qCZ_I.cache +1 -0
  172. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ySJMBl8_8f1TC2JeQF-Rnp4A9M84cYN97jeVikGSTus.cache +0 -0
  173. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/yT-p58G9te94oQFaGeJ0KOz86g27qcAxK0uTpdIhWhY.cache +1 -0
  174. data/spec/spec_helper.rb +14 -0
  175. data/spec/support/database.rb +21 -0
  176. data/spec/support/dynamic-fields-for.rb +11 -0
  177. metadata +351 -3
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  DynamicFieldsFor
2
2
  ================
3
+ [![Gem Version](https://badge.fury.io/rb/dynamic-fields-for.svg)](http://badge.fury.io/rb/dynamic-fields-for)
4
+ [![Build](https://travis-ci.org/stokarenko/dynamic-fields-for.svg)](https://travis-ci.org/stokarenko/dynamic-fields-for)
3
5
 
4
6
  DynamicFieldsFor is a Rails plugin which provides the dynamic association fieldsets to your forms without a pain. And it does nothing more.
5
7
 
@@ -8,7 +10,7 @@ The main features are:
8
10
  * Works with fields block, i.e. not requires the separated partial for them;
9
11
  * Not provides new form helpers, but extend the existing one;
10
12
  * Simple and predictable interface and behavior;
11
- * Not requires any special HTML intities inside templates;
13
+ * Not requires any special HTML entities inside templates;
12
14
  * Supports [Simple Form](https://github.com/plataformatec/simple_form).
13
15
 
14
16
  ## Alternatives
@@ -16,6 +18,7 @@ The main features are:
16
18
  * [Nested Form](https://github.com/ryanb/nested_form)
17
19
 
18
20
  ## Dependencies
21
+ * Ruby >= 1.9.3
19
22
  * [rails](https://github.com/rails/rails) >= 3.2.13
20
23
  * [jquery-rails](https://github.com/rails/jquery-rails)
21
24
  * [association-soft-build](https://github.com/stokarenko/association-soft-build)
@@ -1,3 +1,3 @@
1
1
  module DynamicFieldsFor
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
@@ -0,0 +1,110 @@
1
+ describe DynamicFieldsFor::FormHelper do
2
+ describe '#fields_for' do
3
+ def expect_result(user)
4
+ expect(page).to have_button('Update User')
5
+ expect(user.roles.map(&:role_name)).to match_array(['role 0', 'new role 0', 'new role 1'])
6
+ end
7
+
8
+ def role_inputs
9
+ all('[name$="[role_name]"]')
10
+ end
11
+
12
+ def remove_links
13
+ all('a', text: 'Remove role')
14
+ end
15
+
16
+ def deal_with_dynamic_roles
17
+ expect{remove_links.last.click}.to change{remove_links.size}.from(3).to(2)
18
+ expect{2.times{ click_link 'Add role'}}.to change{remove_links.size}.to(4)
19
+ expect{remove_links.last.click}.to change{remove_links.size}.to(3)
20
+ expect{click_link 'Add role'}.to change{remove_links.size}.to(4)
21
+ expect{remove_links[1].click}.to change{remove_links.size}.to(3)
22
+
23
+ role_inputs.last(2).each_with_index do |element, index|
24
+ element.set("new role #{index}")
25
+ end
26
+ end
27
+
28
+ let(:user){User.first}
29
+
30
+ %w(form_for simple_form_for).each do |form_type|
31
+ context form_type do
32
+
33
+ it 'should pass for new object' do
34
+ visit "/users/new"
35
+
36
+ within("##{form_type}") do
37
+ deal_with_dynamic_roles
38
+
39
+ fill_in 'user[user_name]', with: 'New user'
40
+ role_inputs.first.set('role 0')
41
+
42
+ click_button 'Create User'
43
+ end
44
+
45
+ expect_result(User.find(URI.parse(current_url).path.match(/users\/(\d+)\/edit/)[1]))
46
+ end
47
+
48
+ it 'should pass for existing object' do
49
+ visit "/users/#{user.id}/edit"
50
+
51
+ within("##{form_type}") do
52
+ deal_with_dynamic_roles
53
+
54
+ click_button 'Update User'
55
+ end
56
+
57
+ expect_result(user)
58
+ end
59
+ end
60
+ end
61
+
62
+ it 'should not fail when remove link clicked but dynamic fields are not exists' do
63
+ visit "/users/#{user.id}/edit_without_fields"
64
+
65
+ click_link 'Remove without fields'
66
+ click_button 'Update without fields'
67
+ expect(page).to have_button('Update User')
68
+ end
69
+
70
+ it 'should deal with turbolinks' do
71
+ visit "/users/#{user.id}/edit_without_fields"
72
+ click_link 'Edit'
73
+
74
+ within('#form_for') do
75
+ expect{click_link 'Add role'}.to change{remove_links.size}.from(3).to(4)
76
+ end
77
+
78
+ end
79
+
80
+ it 'should trigger add event' do
81
+ visit "/users/#{user.id}/events"
82
+
83
+ click_link('Add role')
84
+ expect(page).to have_selector(
85
+ '#event_catcher', text: %Q(
86
+ dynamic-fields:before-add-into : fields_container
87
+ dynamic-fields:after-add : role_name
88
+ dynamic-fields:after-add : remove_link
89
+ dynamic-fields:after-add-into : fields_container
90
+ ).gsub(/\s{2,}/, ' ').strip
91
+ )
92
+ end
93
+
94
+ it 'should trigger remove event' do
95
+ visit "/users/#{user.id}/events"
96
+
97
+ all('a', text: 'Remove role').last.click
98
+ expect(page).to have_selector(
99
+ '#event_catcher', text: %Q(
100
+ dynamic-fields:before-remove-from : fields_container
101
+ dynamic-fields:before-remove : role_name
102
+ dynamic-fields:before-remove : remove_link
103
+ dynamic-fields:before-remove : id
104
+ dynamic-fields:after-remove-from : fields_container
105
+ ).gsub(/\s{2,}/, ' ').strip
106
+ )
107
+ end
108
+
109
+ end
110
+ end
@@ -0,0 +1,11 @@
1
+ role_2:
2
+ user: existing
3
+ role_name: role 2
4
+
5
+ role_1:
6
+ user: existing
7
+ role_name: role 1
8
+
9
+ role_0:
10
+ user: existing
11
+ role_name: role 0
@@ -0,0 +1,2 @@
1
+ existing:
2
+ user_name: Existing user
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ RailsApp::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ #= require jquery
2
+ #= require turbolinks
3
+ #= require dynamic-fields-for
4
+
5
+ $(document).on '
6
+ dynamic-fields:before-add-into
7
+ dynamic-fields:after-add
8
+ dynamic-fields:after-add-into
9
+ dynamic-fields:before-remove-from
10
+ dynamic-fields:before-remove
11
+ dynamic-fields:after-remove-from
12
+ ', (e)->
13
+ $('#event_catcher').append("#{e.type} : #{e.target.className || 'id'}<br />")
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,38 @@
1
+ class UsersController < ApplicationController
2
+ before_filter :build_resource, only: [:new, :create]
3
+ before_filter :load_resource, only: [:edit, :update, :edit_without_fields, :events]
4
+
5
+ def new
6
+ 3.times{ @resource.roles.build }
7
+ end
8
+
9
+ def create
10
+ @resource.update_attributes!(resource_params)
11
+ redirect_to edit_user_path(@resource)
12
+ end
13
+
14
+ def update
15
+ @resource.update_attributes!(resource_params)
16
+ redirect_to edit_user_path(@resource)
17
+ end
18
+
19
+ private
20
+
21
+ def scope
22
+ User
23
+ end
24
+
25
+ def build_resource
26
+ @resource = scope.new
27
+ end
28
+
29
+ def load_resource
30
+ @resource = scope.find(params[:id])
31
+ end
32
+
33
+ def resource_params
34
+ DynamicFieldsFor.rails4? ?
35
+ params.fetch(:user, {}).permit(:user_name, roles_attributes: [:id, :role_name, :_destroy]) :
36
+ params[:user]
37
+ end
38
+ end
@@ -0,0 +1,5 @@
1
+ class Role < ActiveRecord::Base
2
+ belongs_to :user
3
+
4
+ validates :user, :role_name, presence: true
5
+ end
@@ -0,0 +1,7 @@
1
+ class User < ActiveRecord::Base
2
+ has_many :roles, inverse_of: :user
3
+
4
+ accepts_nested_attributes_for :roles, allow_destroy: true
5
+
6
+ validates :user_name, presence: true
7
+ end
@@ -0,0 +1,7 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title DynamicFieldsFor Test App
5
+ = javascript_include_tag "application", "data-turbolinks-track" => true
6
+
7
+ %body= yield
@@ -0,0 +1,23 @@
1
+ #form_for
2
+ = form_for resource do |f|
3
+ = f.text_field :user_name
4
+
5
+ = f.fields_for :roles, dynamic: true do |rf|
6
+ = rf.text_field :role_name
7
+ = rf.remove_fields_link 'Remove role'
8
+
9
+ = f.add_fields_link :roles, 'Add role'
10
+
11
+ = f.submit
12
+
13
+ #simple_form_for
14
+ = simple_form_for resource do |f|
15
+ = f.input :user_name
16
+
17
+ = f.simple_fields_for :roles, dynamic: true do |rf|
18
+ = rf.input :role_name
19
+ .remove_link= rf.remove_fields_link 'Remove role'
20
+
21
+ = f.add_fields_link :roles, 'Add role'
22
+
23
+ = f.submit
@@ -0,0 +1 @@
1
+ = render 'form', resource: @resource
@@ -0,0 +1,6 @@
1
+ = link_to 'Edit', edit_user_path(@resource)
2
+
3
+ = form_for @resource do |f|
4
+ = f.remove_fields_link 'Remove without fields'
5
+ = f.add_fields_link :roles, 'Add without fields'
6
+ = f.submit 'Update without fields'
@@ -0,0 +1,13 @@
1
+ = form_for @resource do |f|
2
+ = f.text_field :user_name
3
+
4
+ .fields_container
5
+ = f.fields_for :roles, dynamic: true do |rf|
6
+ = rf.text_field :role_name, class: 'role_name'
7
+ = rf.remove_fields_link 'Remove role', class: 'remove_link'
8
+
9
+ = f.add_fields_link :roles, 'Add role'
10
+
11
+ = f.submit
12
+
13
+ #event_catcher
@@ -0,0 +1 @@
1
+ = render 'form', resource: @resource
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,28 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module RailsApp
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ config.i18n.load_path += Dir[Rails.root.join('config', 'locales', "**", '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+
23
+ # Enable the asset pipeline
24
+ unless DynamicFieldsFor.rails4?
25
+ config.assets.enabled = true
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,10 @@
1
+ module DynamicFieldsFor
2
+ def self.rails4?
3
+ Rails.version.start_with? '4'
4
+ end
5
+ end
6
+
7
+ # Set up gems listed in the Gemfile.
8
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
9
+
10
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,24 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ database: ":memory:"
10
+
11
+ development:
12
+ <<: *default
13
+ database: db/development.sqlite3
14
+ pool: 5
15
+ timeout: 5000
16
+
17
+ # Warning: The database defined as "test" will be erased and
18
+ # re-generated from your development database when you run "rake".
19
+ # Do not set this db to the same as development or production.
20
+ test:
21
+ <<: *default
22
+
23
+ production:
24
+ <<: *default
@@ -0,0 +1,7 @@
1
+ ENV['FIXTURES_PATH'] = '../fixtures'
2
+
3
+ # Load the Rails application.
4
+ require File.expand_path('../application', __FILE__)
5
+
6
+ # Initialize the Rails application.
7
+ RailsApp::Application.initialize!
@@ -0,0 +1,37 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
+ end
@@ -0,0 +1,80 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ DynamicFieldsFor.rails4? ?
24
+ config.serve_static_files = false :
25
+ config.serve_static_assets = false
26
+
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # Generate digests for assets URLs.
35
+ config.assets.digest = true
36
+
37
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
38
+
39
+ # Specifies the header that your server uses for sending files.
40
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
41
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
42
+
43
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
44
+ # config.force_ssl = true
45
+
46
+ # Set to :debug to see everything in the log.
47
+ config.log_level = :info
48
+
49
+ # Prepend all log lines with the following tags.
50
+ # config.log_tags = [ :subdomain, :uuid ]
51
+
52
+ # Use a different logger for distributed setups.
53
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
54
+
55
+ # Use a different cache store in production.
56
+ # config.cache_store = :mem_cache_store
57
+
58
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
59
+ # config.action_controller.asset_host = "http://assets.example.com"
60
+
61
+ # Ignore bad email addresses and do not raise email delivery errors.
62
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
63
+ # config.action_mailer.raise_delivery_errors = false
64
+
65
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
66
+ # the I18n.default_locale when a translation cannot be found).
67
+ config.i18n.fallbacks = true
68
+
69
+ # Send deprecation notices to registered listeners.
70
+ config.active_support.deprecation = :notify
71
+
72
+ # Disable automatic flushing of the log to improve performance.
73
+ # config.autoflush_log = false
74
+
75
+ # Use default logging formatter so that PID and timestamp are not suppressed.
76
+ config.log_formatter = ::Logger::Formatter.new
77
+
78
+ # Do not dump schema after migrations.
79
+ config.active_record.dump_schema_after_migration = false
80
+ end
@@ -0,0 +1,41 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ DynamicFieldsFor.rails4? ?
17
+ config.serve_static_files = true :
18
+ config.serve_static_assets = true
19
+ config.static_cache_control = 'public, max-age=3600'
20
+
21
+ # Show full error reports and disable caching.
22
+ config.consider_all_requests_local = true
23
+ config.action_controller.perform_caching = false
24
+
25
+ # Raise exceptions instead of rendering exception templates.
26
+ config.action_dispatch.show_exceptions = false
27
+
28
+ # Disable request forgery protection in test environment.
29
+ config.action_controller.allow_forgery_protection = false
30
+
31
+ # Tell Action Mailer not to deliver emails to the real world.
32
+ # The :test delivery method accumulates sent emails in the
33
+ # ActionMailer::Base.deliveries array.
34
+ config.action_mailer.delivery_method = :test
35
+
36
+ # Print deprecation notices to the stderr.
37
+ config.active_support.deprecation = :stderr
38
+
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
41
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -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,5 @@
1
+ if DynamicFieldsFor.rails4?
2
+ RailsApp::Application.config.secret_key_base = '8cec03a73bd1f8cdf2c519131bb5475775684177ce99c27c254e9617313950f06972cd0e027ea5627570b133f8d5385bd5aaec119351f65bec03a0facb0de559'
3
+ else
4
+ RailsApp::Application.config.secret_token = '8cec03a73bd1f8cdf2c519131bb5475775684177ce99c27c254e9617313950f06972cd0e027ea5627570b133f8d5385bd5aaec119351f65bec03a0facb0de559'
5
+ end
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session'