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
@@ -0,0 +1,166 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, class: :input,
9
+ hint_class: :field_with_hint, error_class: :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input placeholder: "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => true`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, wrap_with: { tag: :span, class: :hint }
45
+ b.use :error, wrap_with: { tag: :span, class: :error }
46
+
47
+ ## full_messages_for
48
+ # If you want to display the full error message for the attribute, you can
49
+ # use the component :full_error, like:
50
+ #
51
+ # b.use :full_error, wrap_with: { tag: :span, class: :error }
52
+ end
53
+
54
+ # The default wrapper to be used by the FormBuilder.
55
+ config.default_wrapper = :default
56
+
57
+ # Define the way to render check boxes / radio buttons with labels.
58
+ # Defaults to :nested for bootstrap config.
59
+ # inline: input + label
60
+ # nested: label > input
61
+ config.boolean_style = :nested
62
+
63
+ # Default class for buttons
64
+ config.button_class = 'btn'
65
+
66
+ # Method used to tidy up errors. Specify any Rails Array method.
67
+ # :first lists the first message for each field.
68
+ # Use :to_sentence to list all errors for each field.
69
+ # config.error_method = :first
70
+
71
+ # Default tag used for error notification helper.
72
+ config.error_notification_tag = :div
73
+
74
+ # CSS class to add for error notification helper.
75
+ config.error_notification_class = 'error_notification'
76
+
77
+ # ID to add for error notification helper.
78
+ # config.error_notification_id = nil
79
+
80
+ # Series of attempts to detect a default label method for collection.
81
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
82
+
83
+ # Series of attempts to detect a default value method for collection.
84
+ # config.collection_value_methods = [ :id, :to_s ]
85
+
86
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
87
+ # config.collection_wrapper_tag = nil
88
+
89
+ # You can define the class to use on all collection wrappers. Defaulting to none.
90
+ # config.collection_wrapper_class = nil
91
+
92
+ # You can wrap each item in a collection of radio/check boxes with a tag,
93
+ # defaulting to :span. Please note that when using :boolean_style = :nested,
94
+ # SimpleForm will force this option to be a label.
95
+ # config.item_wrapper_tag = :span
96
+
97
+ # You can define a class to use in all item wrappers. Defaulting to none.
98
+ # config.item_wrapper_class = nil
99
+
100
+ # How the label text should be generated altogether with the required text.
101
+ # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
102
+
103
+ # You can define the class to use on all labels. Default is nil.
104
+ # config.label_class = nil
105
+
106
+ # You can define the default class to be used on forms. Can be overriden
107
+ # with `html: { :class }`. Defaulting to none.
108
+ # config.default_form_class = nil
109
+
110
+ # You can define which elements should obtain additional classes
111
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
112
+
113
+ # Whether attributes are required by default (or not). Default is true.
114
+ # config.required_by_default = true
115
+
116
+ # Tell browsers whether to use the native HTML5 validations (novalidate form option).
117
+ # These validations are enabled in SimpleForm's internal config but disabled by default
118
+ # in this configuration, which is recommended due to some quirks from different browsers.
119
+ # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
120
+ # change this configuration to true.
121
+ config.browser_validations = false
122
+
123
+ # Collection of methods to detect if a file type was given.
124
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
125
+
126
+ # Custom mappings for input types. This should be a hash containing a regexp
127
+ # to match as key, and the input type that will be used when the field name
128
+ # matches the regexp as value.
129
+ # config.input_mappings = { /count/ => :integer }
130
+
131
+ # Custom wrappers for input types. This should be a hash containing an input
132
+ # type as key and the wrapper that will be used for all inputs with specified type.
133
+ # config.wrapper_mappings = { string: :prepend }
134
+
135
+ # Namespaces where SimpleForm should look for custom input classes that
136
+ # override default inputs.
137
+ # config.custom_inputs_namespaces << "CustomInputs"
138
+
139
+ # Default priority for time_zone inputs.
140
+ # config.time_zone_priority = nil
141
+
142
+ # Default priority for country inputs.
143
+ # config.country_priority = nil
144
+
145
+ # When false, do not use translations for labels.
146
+ # config.translate_labels = true
147
+
148
+ # Automatically discover new inputs in Rails' autoload path.
149
+ # config.inputs_discovery = true
150
+
151
+ # Cache SimpleForm inputs discovery
152
+ # config.cache_discovery = !Rails.env.development?
153
+
154
+ # Default class for inputs
155
+ # config.input_class = nil
156
+
157
+ # Define the default class of the input wrapper of the boolean input.
158
+ # config.boolean_label_class = 'checkbox'
159
+
160
+ # Defines if the default input wrapper class should be included in radio
161
+ # collection wrappers.
162
+ # config.include_default_input_wrapper_class = true
163
+
164
+ # Defines which i18n scope will be used in Simple Form.
165
+ # config.i18n_scope = 'simple_form'
166
+ end
@@ -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,31 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+ # include_blanks:
27
+ # defaults:
28
+ # age: 'Rather not say'
29
+ # prompts:
30
+ # defaults:
31
+ # age: 'Select your age'
@@ -0,0 +1,8 @@
1
+ Rails.application.routes.draw do
2
+ resources :users do
3
+ member do
4
+ get 'edit_without_fields'
5
+ get 'events'
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run RailsApp::Application
File without changes
@@ -0,0 +1,12 @@
1
+ class CreateTables < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :user_name
5
+ end
6
+
7
+ create_table :roles do |t|
8
+ t.references :user
9
+ t.string :role_name
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,25 @@
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: 1) do
15
+
16
+ create_table "roles", force: true do |t|
17
+ t.integer "user_id"
18
+ t.string "role_name"
19
+ end
20
+
21
+ create_table "users", force: true do |t|
22
+ t.string "user_name"
23
+ end
24
+
25
+ end
Binary file