hobo 1.1.0 → 1.3.0.RC

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. data/CHANGES.txt +238 -287
  2. data/Rakefile +14 -31
  3. data/VERSION +1 -0
  4. data/{lib/hobo → app/controllers}/dev_controller.rb +6 -6
  5. data/app/controllers/dryml_support_controller.rb +13 -0
  6. data/{rails_generators/hobo_front_controller/templates → app/views/dev}/summary.dryml +7 -10
  7. data/bin/hobo +12 -144
  8. data/config/initializers/inflections.rb +3 -0
  9. data/config/routes.rb +6 -0
  10. data/{doctest → doctests}/hobo/lifecycles.rdoctest +40 -59
  11. data/{doctest → doctests/hobo}/model.rdoctest +33 -40
  12. data/{doctest → doctests/hobo}/multi_model_forms.rdoctest +15 -19
  13. data/{doctest → doctests/hobo}/scopes.rdoctest +27 -41
  14. data/doctests/prepare_testapp.rb +8 -0
  15. data/hobo.gemspec +26 -199
  16. data/lib/generators/hobo/activation_email.rb +11 -0
  17. data/lib/generators/hobo/admin_subsite/admin_subsite_generator.rb +35 -0
  18. data/lib/generators/hobo/admin_subsite/templates/admin.css +20 -0
  19. data/lib/generators/hobo/admin_subsite/templates/admin_tag_injection.erb +10 -0
  20. data/{rails_generators/hobo_admin_site → lib/generators/hobo/admin_subsite}/templates/application.dryml +0 -0
  21. data/{rails_generators/hobo_admin_site/templates/controller.rb → lib/generators/hobo/admin_subsite/templates/controller.rb.erb} +5 -5
  22. data/lib/generators/hobo/admin_subsite/templates/users_index.dryml +7 -0
  23. data/lib/generators/hobo/assets/assets_generator.rb +18 -0
  24. data/{rails_generators/hobo → lib/generators/hobo/assets}/templates/application.css +0 -0
  25. data/lib/generators/hobo/assets/templates/application.dryml.erb +9 -0
  26. data/{rails_generators/hobo → lib/generators/hobo/assets}/templates/dryml-support.js +2 -2
  27. data/lib/generators/hobo/assets/templates/dryml_taglibs_initializer.rb +1 -0
  28. data/lib/generators/hobo/assets/templates/en_injection.yml +19 -0
  29. data/{rails_generators/hobo → lib/generators/hobo/assets}/templates/guest.rb +1 -1
  30. data/lib/generators/hobo/controller.rb +35 -0
  31. data/lib/generators/hobo/controller/controller_generator.rb +6 -0
  32. data/lib/generators/hobo/controller/templates/controller.rb.erb +7 -0
  33. data/{rails_generators/hobo_front_controller → lib/generators/hobo/front_controller}/USAGE +0 -0
  34. data/lib/generators/hobo/front_controller/front_controller_generator.rb +55 -0
  35. data/{rails_generators/hobo_front_controller/templates/controller.rb → lib/generators/hobo/front_controller/templates/controller.rb.erb} +0 -0
  36. data/{rails_generators/hobo_front_controller → lib/generators/hobo/front_controller}/templates/index.dryml +6 -12
  37. data/lib/generators/hobo/i18n/i18n_generator.rb +35 -0
  38. data/lib/generators/hobo/i18n/templates/app.de.yml +30 -0
  39. data/lib/generators/hobo/i18n/templates/app.en.yml +25 -0
  40. data/lib/generators/hobo/i18n/templates/app.es.yml +31 -0
  41. data/lib/generators/hobo/i18n/templates/app.fr.yml +26 -0
  42. data/lib/generators/hobo/i18n/templates/app.it.yml +28 -0
  43. data/lib/generators/hobo/i18n/templates/app.pt-PT.yml +25 -0
  44. data/lib/generators/hobo/i18n/templates/app.ru.yml +24 -0
  45. data/lib/generators/hobo/i18n/templates/hobo.de.yml +204 -0
  46. data/lib/generators/hobo/i18n/templates/hobo.en.yml +195 -0
  47. data/lib/generators/hobo/i18n/templates/hobo.es.yml +202 -0
  48. data/lib/generators/hobo/i18n/templates/hobo.fr.yml +195 -0
  49. data/lib/generators/hobo/i18n/templates/hobo.it.yml +202 -0
  50. data/lib/generators/hobo/i18n/templates/hobo.pt-PT.yml +196 -0
  51. data/lib/generators/hobo/i18n/templates/hobo.ru.yml +200 -0
  52. data/lib/generators/hobo/invite_only.rb +18 -0
  53. data/lib/generators/hobo/model/USAGE +19 -0
  54. data/lib/generators/hobo/model/model_generator.rb +11 -0
  55. data/{rails_generators/hobo_model/templates/model.rb → lib/generators/hobo/model/templates/model_injection.rb.erb} +0 -2
  56. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/USAGE +0 -0
  57. data/lib/generators/hobo/rapid/rapid_generator.rb +24 -0
  58. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/IE7.js +0 -0
  59. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/blank.gif +0 -0
  60. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/hobo-rapid.css +0 -0
  61. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/hobo-rapid.js +65 -65
  62. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/ie7-recalc.js +21 -21
  63. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/lowpro.js +31 -31
  64. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/reset.css +1 -1
  65. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-ACD3E6-DBE1E5-H.png +0 -0
  66. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-DBE1E5-FCFEF5-H.png +0 -0
  67. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/300-3B5F87-ACD3E6-H.png +0 -0
  68. data/{rails_generators/hobo_rapid/templates/themes/clean → lib/generators/hobo/rapid/templates/themes/clean-sidemenu}/public/images/spinner.gif +0 -0
  69. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/stylesheets/clean-sidemenu.css +81 -0
  70. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/views/clean-sidemenu.dryml +30 -0
  71. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/101-3B5F87-ACD3E6.png +0 -0
  72. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/30-3E547A-242E42.png +0 -0
  73. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/30-DBE1E5-FCFEF5.png +0 -0
  74. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/300-ACD3E6-fff.png +0 -0
  75. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/50-ACD3E6-fff.png +0 -0
  76. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/fieldbg.gif +0 -0
  77. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/pencil.png +0 -0
  78. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/images/small_close.png +0 -0
  79. data/lib/generators/hobo/rapid/templates/themes/clean/public/images/spinner.gif +0 -0
  80. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/stylesheets/clean.css +16 -16
  81. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/public/stylesheets/rapid-ui.css +3 -3
  82. data/{rails_generators/hobo_rapid → lib/generators/hobo/rapid}/templates/themes/clean/views/clean.dryml +1 -1
  83. data/lib/generators/hobo/resource/resource_generator.rb +23 -0
  84. data/lib/generators/hobo/routes/USAGE +9 -0
  85. data/lib/generators/hobo/routes/router.rb +115 -0
  86. data/lib/generators/hobo/routes/routes_generator.rb +40 -0
  87. data/lib/generators/hobo/routes/templates/hobo_routes.rb.erb +33 -0
  88. data/lib/generators/hobo/setup_wizard/USAGE +4 -0
  89. data/lib/generators/hobo/setup_wizard/setup_wizard_generator.rb +274 -0
  90. data/lib/generators/hobo/subsite.rb +48 -0
  91. data/lib/generators/hobo/subsite/subsite_generator.rb +16 -0
  92. data/{rails_generators/hobo_subsite → lib/generators/hobo/subsite}/templates/application.dryml +0 -0
  93. data/{rails_generators/hobo_subsite/templates/controller.rb → lib/generators/hobo/subsite/templates/controller.rb.erb} +1 -1
  94. data/lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb +16 -0
  95. data/{rails_generators/hobo_admin_site/templates/site_taglib.dryml → lib/generators/hobo/subsite_taglib/templates/taglib.dryml.erb} +9 -10
  96. data/lib/generators/hobo/taglib.rb +12 -0
  97. data/lib/generators/hobo/test_framework/test_framework_generator.rb +72 -0
  98. data/lib/generators/hobo/test_options.rb +19 -0
  99. data/{rails_generators/hobo_user_controller → lib/generators/hobo/user_controller}/templates/accept_invitation.dryml +0 -0
  100. data/lib/generators/hobo/user_controller/templates/controller.rb.erb +31 -0
  101. data/lib/generators/hobo/user_controller/user_controller_generator.rb +25 -0
  102. data/lib/generators/hobo/user_mailer/templates/activation.erb +9 -0
  103. data/{rails_generators/hobo_user_model → lib/generators/hobo/user_mailer}/templates/forgot_password.erb +2 -2
  104. data/{rails_generators/hobo_user_model → lib/generators/hobo/user_mailer}/templates/invite.erb +2 -2
  105. data/lib/generators/hobo/user_mailer/templates/mailer.rb.erb +25 -0
  106. data/lib/generators/hobo/user_mailer/user_mailer_generator.rb +33 -0
  107. data/lib/generators/hobo/user_model/USAGE +12 -0
  108. data/{rails_generators/hobo_user_model/templates/model.rb → lib/generators/hobo/user_model/templates/model_injection.rb.erb} +40 -20
  109. data/lib/generators/hobo/user_model/user_model_generator.rb +23 -0
  110. data/lib/generators/hobo/user_resource/user_resource_generator.rb +27 -0
  111. data/lib/hobo.rb +29 -129
  112. data/lib/hobo/controller.rb +37 -47
  113. data/lib/hobo/controller/authentication_support.rb +109 -0
  114. data/lib/hobo/{model_controller.rb → controller/model.rb} +71 -79
  115. data/lib/hobo/{user_controller.rb → controller/user.rb} +59 -49
  116. data/lib/hobo/engine.rb +80 -0
  117. data/lib/hobo/extensions/action_controller/hobo_methods.rb +44 -0
  118. data/lib/hobo/extensions/action_mailer/helper.rb +38 -0
  119. data/lib/{action_view_extensions/helpers → hobo/extensions/action_view}/tag_helper.rb +5 -2
  120. data/lib/hobo/extensions/action_view/translation_helper.rb +25 -0
  121. data/lib/hobo/extensions/active_model/name.rb +16 -0
  122. data/lib/hobo/extensions/active_model/translation.rb +35 -0
  123. data/lib/{active_record/association_collection.rb → hobo/extensions/active_record/associations/collection.rb} +8 -17
  124. data/lib/{active_record/association_proxy.rb → hobo/extensions/active_record/associations/proxy.rb} +6 -7
  125. data/lib/hobo/extensions/active_record/associations/reflection.rb +23 -0
  126. data/lib/hobo/extensions/active_record/associations/scope.rb +35 -0
  127. data/lib/hobo/extensions/active_record/hobo_methods.rb +11 -0
  128. data/lib/hobo/extensions/active_record/permissions.rb +159 -0
  129. data/lib/hobo/extensions/active_record/relation_with_origin.rb +28 -0
  130. data/lib/hobo/extensions/array.rb +27 -0
  131. data/lib/hobo/extensions/enumerable.rb +12 -0
  132. data/lib/hobo/extensions/i18n.rb +17 -0
  133. data/lib/hobo/{hobo_helper.rb → helper.rb} +58 -31
  134. data/lib/hobo/helper/translations.rb +54 -0
  135. data/lib/hobo/helper/translations/normalizer.rb +39 -0
  136. data/lib/hobo/model.rb +61 -95
  137. data/lib/hobo/model/accessible_associations.rb +178 -0
  138. data/lib/hobo/{find_for.rb → model/find_for.rb} +17 -17
  139. data/lib/hobo/model/guest.rb +25 -0
  140. data/lib/hobo/model/include_in_save.rb +55 -0
  141. data/lib/hobo/model/lifecycles.rb +119 -0
  142. data/lib/hobo/model/lifecycles/actions.rb +146 -0
  143. data/lib/hobo/model/lifecycles/creator.rb +74 -0
  144. data/lib/hobo/model/lifecycles/lifecycle.rb +243 -0
  145. data/lib/hobo/model/lifecycles/state.rb +22 -0
  146. data/lib/hobo/model/lifecycles/transition.rb +70 -0
  147. data/lib/hobo/model/permissions.rb +448 -0
  148. data/lib/hobo/model/scopes.rb +38 -0
  149. data/lib/hobo/model/scopes/apply_scopes.rb +21 -0
  150. data/lib/hobo/model/scopes/automatic_scopes.rb +428 -0
  151. data/lib/hobo/model/user_base.rb +184 -0
  152. data/lib/hobo/model/view_hints.rb +123 -0
  153. data/{rapid_generators → lib/hobo/rapid/generators}/rapid/cards.dryml.erb +2 -2
  154. data/{rapid_generators → lib/hobo/rapid/generators}/rapid/forms.dryml.erb +3 -3
  155. data/{rapid_generators → lib/hobo/rapid/generators}/rapid/pages.dryml.erb +38 -51
  156. data/lib/hobo/rapid/helper.rb +166 -0
  157. data/{taglibs → lib/hobo/rapid/taglibs}/rapid.dryml +6 -5
  158. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_core.dryml +286 -118
  159. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_document_tags.dryml +2 -2
  160. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_editing.dryml +45 -45
  161. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_forms.dryml +190 -158
  162. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_generics.dryml +12 -9
  163. data/lib/hobo/rapid/taglibs/rapid_i18n.dryml +107 -0
  164. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_lifecycles.dryml +7 -7
  165. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_navigation.dryml +15 -15
  166. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_pages.dryml +37 -36
  167. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_plus.dryml +107 -43
  168. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_summary.dryml +28 -57
  169. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_support.dryml +9 -9
  170. data/{taglibs → lib/hobo/rapid/taglibs}/rapid_user_pages.dryml +41 -40
  171. data/lib/hobo/routes.rb +31 -0
  172. data/{doctest → test/doctest}/hobo/hobo_helper.rdoctest +11 -11
  173. data/test/irt/generators/admin_subsite.irt +27 -0
  174. data/test/irt/generators/assets.irt +16 -0
  175. data/test/irt/generators/controller.irt +6 -0
  176. data/test/irt/generators/front_controller.irt +30 -0
  177. data/test/irt/generators/helper.rb +31 -0
  178. data/test/irt/generators/model.irt +28 -0
  179. data/test/irt/generators/partials/_account_user_model_tests.rb +21 -0
  180. data/test/irt/generators/partials/_accounts_users_controller_tests.rb +15 -0
  181. data/test/irt/generators/partials/_default_user_model_tests.rb +21 -0
  182. data/test/irt/generators/partials/_default_users_controller_tests.rb +16 -0
  183. data/test/irt/generators/partials/_house_controller_tests.rb +15 -0
  184. data/test/irt/generators/partials/_house_model_tests.rb +18 -0
  185. data/test/irt/generators/partials/_subsite_taglib_admin.rb +4 -0
  186. data/test/irt/generators/partials/_subsite_taglib_admin_invite_only.rb +3 -0
  187. data/test/irt/generators/partials/_subsite_taglib_noopt.rb +4 -0
  188. data/test/irt/generators/partials/_subsite_taglib_variables.rb +27 -0
  189. data/test/irt/generators/partials/_user_mailer_tests.rb +19 -0
  190. data/test/irt/generators/rapid.irt +29 -0
  191. data/test/irt/generators/resource.irt +8 -0
  192. data/test/irt/generators/subsite.irt +52 -0
  193. data/test/irt/generators/subsite_taglib.irt +23 -0
  194. data/test/irt/generators/test_framework.irt +62 -0
  195. data/test/irt/generators/user_controller.irt +10 -0
  196. data/test/irt/generators/user_mailer.irt +20 -0
  197. data/test/irt/generators/user_model.irt +10 -0
  198. data/test/irt/generators/user_resource.irt +14 -0
  199. data/test/irt/readme.txt +7 -0
  200. data/test/permissions/models/models.rb +27 -24
  201. data/test/permissions/test_permissions.rb +104 -104
  202. metadata +239 -217
  203. data/lib/active_record/association_reflection.rb +0 -20
  204. data/lib/active_record/viewhints_validations_interceptor.rb +0 -9
  205. data/lib/hobo/accessible_associations.rb +0 -183
  206. data/lib/hobo/authentication_support.rb +0 -131
  207. data/lib/hobo/generator.rb +0 -26
  208. data/lib/hobo/guest.rb +0 -25
  209. data/lib/hobo/include_in_save.rb +0 -55
  210. data/lib/hobo/lifecycles.rb +0 -137
  211. data/lib/hobo/lifecycles/actions.rb +0 -142
  212. data/lib/hobo/lifecycles/creator.rb +0 -72
  213. data/lib/hobo/lifecycles/lifecycle.rb +0 -249
  214. data/lib/hobo/lifecycles/state.rb +0 -22
  215. data/lib/hobo/lifecycles/transition.rb +0 -70
  216. data/lib/hobo/model_router.rb +0 -290
  217. data/lib/hobo/permissions.rb +0 -451
  218. data/lib/hobo/permissions/associations.rb +0 -175
  219. data/lib/hobo/rapid_helper.rb +0 -157
  220. data/lib/hobo/scopes.rb +0 -43
  221. data/lib/hobo/scopes/apply_scopes.rb +0 -23
  222. data/lib/hobo/scopes/association_proxy_extensions.rb +0 -62
  223. data/lib/hobo/scopes/automatic_scopes.rb +0 -421
  224. data/lib/hobo/scopes/named_scope_extensions.rb +0 -39
  225. data/lib/hobo/tasks/rails.rb +0 -4
  226. data/lib/hobo/translations.rb +0 -93
  227. data/lib/hobo/undefined_access_error.rb +0 -5
  228. data/lib/hobo/user.rb +0 -182
  229. data/lib/hobo/view_hints.rb +0 -115
  230. data/rails/init.rb +0 -10
  231. data/rails_generators/hobo/USAGE +0 -4
  232. data/rails_generators/hobo/hobo_generator.rb +0 -53
  233. data/rails_generators/hobo/templates/application.dryml +0 -1
  234. data/rails_generators/hobo/templates/initializer.rb +0 -2
  235. data/rails_generators/hobo_admin_site/USAGE +0 -16
  236. data/rails_generators/hobo_admin_site/hobo_admin_site_generator.rb +0 -45
  237. data/rails_generators/hobo_admin_site/templates/admin.css +0 -2
  238. data/rails_generators/hobo_admin_site/templates/users_index.dryml +0 -5
  239. data/rails_generators/hobo_front_controller/hobo_front_controller_generator.rb +0 -95
  240. data/rails_generators/hobo_front_controller/templates/functional_test.rb +0 -8
  241. data/rails_generators/hobo_front_controller/templates/helper.rb +0 -2
  242. data/rails_generators/hobo_model/USAGE +0 -25
  243. data/rails_generators/hobo_model/hobo_model_generator.rb +0 -43
  244. data/rails_generators/hobo_model/templates/fixtures.yml +0 -6
  245. data/rails_generators/hobo_model/templates/hints.rb +0 -7
  246. data/rails_generators/hobo_model/templates/unit_test.rb +0 -8
  247. data/rails_generators/hobo_model_controller/USAGE +0 -30
  248. data/rails_generators/hobo_model_controller/hobo_model_controller_generator.rb +0 -46
  249. data/rails_generators/hobo_model_controller/templates/controller.rb +0 -7
  250. data/rails_generators/hobo_model_controller/templates/functional_test.rb +0 -8
  251. data/rails_generators/hobo_model_controller/templates/helper.rb +0 -2
  252. data/rails_generators/hobo_model_resource/USAGE +0 -38
  253. data/rails_generators/hobo_model_resource/hobo_model_resource_generator.rb +0 -73
  254. data/rails_generators/hobo_model_resource/templates/controller.rb +0 -7
  255. data/rails_generators/hobo_model_resource/templates/functional_test.rb +0 -8
  256. data/rails_generators/hobo_model_resource/templates/helper.rb +0 -2
  257. data/rails_generators/hobo_rapid/hobo_rapid_generator.rb +0 -94
  258. data/rails_generators/hobo_subsite/USAGE +0 -16
  259. data/rails_generators/hobo_subsite/hobo_subsite_generator.rb +0 -73
  260. data/rails_generators/hobo_subsite/templates/site_taglib.dryml +0 -13
  261. data/rails_generators/hobo_user_controller/USAGE +0 -34
  262. data/rails_generators/hobo_user_controller/hobo_user_controller_generator.rb +0 -65
  263. data/rails_generators/hobo_user_controller/templates/controller.rb +0 -29
  264. data/rails_generators/hobo_user_controller/templates/functional_test.rb +0 -8
  265. data/rails_generators/hobo_user_controller/templates/helper.rb +0 -2
  266. data/rails_generators/hobo_user_model/USAGE +0 -16
  267. data/rails_generators/hobo_user_model/hobo_user_model_generator.rb +0 -46
  268. data/rails_generators/hobo_user_model/templates/fixtures.yml +0 -19
  269. data/rails_generators/hobo_user_model/templates/mailer.rb +0 -29
  270. data/rails_generators/hobo_user_model/templates/unit_test.rb +0 -8
  271. data/script/destroy +0 -14
  272. data/script/generate +0 -14
  273. data/taglibs/rapid_translations.dryml +0 -36
  274. data/tasks/environments.rake +0 -19
  275. data/tasks/hobo_tasks.rake +0 -58
  276. data/test/generators/test_generator_helper.rb +0 -29
  277. data/test/generators/test_helper.rb +0 -1
  278. data/test/generators/test_hobo_model_controller_generator.rb +0 -56
@@ -1,7 +1,7 @@
1
1
  <!-- Tags that define higher level interactive 'widgets' -->
2
2
 
3
3
  <!-- An enhanced version of Rapid's `<table>` that has support for column sorting, searching and pagination.
4
-
4
+
5
5
  This tag calls `<table merge-params>`, so the parameters for `<table>` are also available.
6
6
 
7
7
  An [worked example](/tutorials/agility#improve_the_project_page_with_a_searchable_sortable_table) of this tag is available in the [Agility Tutorial](/tutorials/agility)
@@ -15,21 +15,12 @@ An [worked example](/tutorials/agility#improve_the_project_page_with_a_searchabl
15
15
  <div class="search">
16
16
  <form param="search-form" method="get" action="">
17
17
  <hidden-fields for-query-string skip="page, search"/>
18
- <span><ht key="hobo.table_plus.search">Search</ht></span>
18
+ <span><t key="hobo.table_plus.search">Search</t></span>
19
19
  <input class="search" type="search" name="search" value="&params[:search]"/>
20
- <submit label="Go" class="search-button" param="search-submit"/>
20
+ <submit label="&t('hobo.table_plus.submit_label', :default=>'Go')" class="search-button" param="search-submit"/>
21
21
  </form>
22
22
  </div>
23
23
  </div>
24
- <%
25
- page_path = if (request.post? || request.put?) && params[:page_path]
26
- params[:page_path]
27
- else
28
- view_name.sub(Dryml::EMPTY_PAGE, params[:action] || '')
29
- end
30
- controller, action = page_path.split('/')
31
- %>
32
-
33
24
 
34
25
  <table merge-attrs="&attributes & (attrs_for(:table) + attrs_for(:with_fields))" empty merge-params>
35
26
  <field-heading-row:>
@@ -37,12 +28,12 @@ An [worked example](/tutorials/agility#improve_the_project_page_with_a_searchabl
37
28
  <% col = sort_columns[scope.field_path] || scope.field_path
38
29
  sort = sort_field == col && sort_direction == 'asc' ?
39
30
  "-#{col}" : col
40
- sort_url = url_for(params.merge(:sort => sort, :controller => controller, :action => action) - [:page])
41
- col_heading_name = this.member_class.try.view_hints.try.field_name(scope.field_name) || scope.field_name.titleize %>
42
-
43
- <th param="#{scope.field-name}-heading">
44
- <a href="&sort_url" class="column-sort"
45
- param="#{scope.field-name}-heading-link"><%= col_heading_name %></a>
31
+ sort_url = url_for_page_path(params.merge(:sort => sort) - [:page])
32
+ col_heading_name = this.member_class.try.human_attribute_name(scope.field_name, :default=> scope.field_name.titleize) %>
33
+
34
+ <th param="#{scope.field_name}-heading">
35
+ <a href="&sort_url" class="column-sort"
36
+ param="#{scope.field_name}-heading-link"><%= col_heading_name %></a>
46
37
  <if test="&col == sort_field">
47
38
  <do param="up-arrow" if="&sort_direction == 'desc'">&uarr;</do>
48
39
  <do param="down-arrow" if="&sort_direction == 'asc'">&darr;</do>
@@ -51,19 +42,18 @@ An [worked example](/tutorials/agility#improve_the_project_page_with_a_searchabl
51
42
  </with-field-names>
52
43
  <th if="&all_parameters[:controls]" class="controls"></th>
53
44
  </field-heading-row>
54
- </table>
55
- <do param="empty-message" if="empty?"><ht key="hobo.table_plus.empty" model="#{name.downcase}">No <collection-name lowercase/> to display</ht></do>
45
+ </table>
46
+ <empty-collection-message param="empty-message"/>
56
47
 
57
-
58
- <page-nav param params="&{:action=>action, :controller=>controller}" if="&this.respond_to?(:page_count) || this.respond_to?(:total_pages)"/>
48
+ <page-nav param params="&recognize_page_path.slice(:controller,:action)" if="&this.respond_to?(:page_count) || this.respond_to?(:total_pages)"/>
59
49
  </div>
60
50
  </def>
61
51
 
62
52
 
63
- <!-- An enhanced version of Rapid's `<collection>` tag that supports drag-and-drop re-ordering.
64
-
53
+ <!-- An enhanced version of Rapid's `<collection>` tag that supports drag-and-drop re-ordering.
54
+
65
55
  Each item in the collection has a `<div class="ordering-handle" param="handle">` added, which can be used to drag the item up and down.
66
-
56
+
67
57
  ### Attributes
68
58
 
69
59
  - `sortable-options` - a hash of options to pass to the `sortable_elemnt` helper. Default are:
@@ -73,8 +63,8 @@ Each item in the collection has a `<div class="ordering-handle" param="handle">`
73
63
  :scroll => :window,
74
64
  :handle => 'ordering-handle',
75
65
  :complete => [visual_effect(:highlight, attributes[:id])] }
76
-
77
- ### Controller support
66
+
67
+ ### Controller support
78
68
 
79
69
  This tag assumes the controller has a `reorder` action and the model has a `position_column` method. This action is added automatically by Hobo's model-controller if the model declares `acts_as_list`. See also [Drag and Drop Reordering](/manual/controllers#drag_and_drop_reordering) in the [Controllers and Routing](/manual/controllers) chapter of the manual.
80
70
  -->
@@ -105,21 +95,34 @@ This tag assumes the controller has a `reorder` action and the model has a `posi
105
95
  </def>
106
96
 
107
97
 
98
+ <!-- Deprecated: use collection-preview instead. -->
99
+ <def tag="preview-with-more"><collection-preview merge/></def>
100
+
101
+
108
102
  <!-- Captures the common pattern of a list of "the first few" cards, along with a link to the rest. -->
109
- <def tag="preview-with-more" attrs="name">
110
- <% name ||= collection_name.pluralize -%>
111
- <section class="#{name.gsub(' ', '-').dasherize} preview-with-more" param="default">
112
- <h3 param="heading"><%= name.titleize %></h3>
113
- <a param="more"><ht key="hobo.live_search.more">More</ht> <type-name plural lowercase/>...</a>
103
+ <def tag="collection-preview" attrs="name">
104
+ <% model_class = this.member_class
105
+ name ||= model_class.name.downcase.pluralize -%>
106
+ <section class="#{name.dasherize} collection-preview" param="default">
107
+ <h3 param="heading">
108
+ <ht key="#{model_class.to_s.underscore}.collection.heading" count="&this.size">
109
+ <do param="heading-content"><%= name.pluralize.titleize %></do>
110
+ </ht>
111
+ </h3>
112
+ <a with="&model_class" action="new" if="&can_create?(model_class.new)" param="new-link">
113
+ <ht key="#{model_class.to_s.underscore}.actions.new">New <%= model_class.model_name.human %></ht>
114
+ </a>
114
115
  <collection param/>
115
- <a action="new" if="&can_create?(this.new)" param="new-link">New <%= this.member_class.view_hints.model_name %></a>
116
+ <unless test="&this.empty? || this.size == model_class.count">
117
+ <a param="show-all"><ht key="#{model_class.to_s.underscore}.actions.show_all" count="100">Show all <%= name.pluralize.titleize %>...</ht></a>
118
+ </unless>
116
119
  </section>
117
120
  </def>
118
121
 
119
122
 
120
123
  <!-- Renders a gravatar (see [gravatar.com](http://gravatar.com)) image in side a link to `this`. Requires `this` to have an `email_address` field. Normally called with a user record in context.
121
124
 
122
- ### Attributes
125
+ ### Attributes
123
126
 
124
127
  - `size` - Size in pixels of the image. Defaults to 80.
125
128
  - `rating` - The rating allowed. Defaults to 'g'. See [gravatar.com](http://gravatar.com) for information on ratings.
@@ -134,11 +137,11 @@ This tag assumes the controller has a `reorder` action and the model has a `posi
134
137
  <!-- Provides an ajax-powered *find-as-you-type* live search field which is hooked up to Hobo's site-side search feature. At the moment this tag is not very flexible. It is not easy to use if for anything other than Hobo's site-wide search. -->
135
138
  <def tag="live-search">
136
139
  <div class="search">
137
- <label for="search-field"><ht key="hobo.live_search.label">Search</ht></label><input type="search" class="live-search"/>
140
+ <label for="search-field"><t key="hobo.live_search.label">Search</t></label><input type="search" class="live-search"/>
138
141
  <spinner id="search-spinner"/>
139
142
  </div>
140
143
  <section class="hidden" id="search-results-panel">
141
- <h2><ht key="hobo.live_search.results_label">Search Results</ht></h2><div param="close-button"><ht key="hobo.live_search.close_button">close</ht></div>
144
+ <h2><t key="hobo.live_search.results_label">Search Results</t></h2><div param="close-button"><t key="hobo.live_search.close_button">close</t></div>
142
145
  <section id="search-results">&nbsp;</section>
143
146
  </section>
144
147
  </def>
@@ -159,22 +162,83 @@ And the controller action:
159
162
  finder = params[:state] ? Order.send(params[:state]) : Order
160
163
  hobo_index finder
161
164
  end
162
-
165
+
163
166
  See [Filtering stories by status](/tutorials/agility#filtering_stories_by_status) in the [Agility Tutorial](/tutorials/agility) for an example.
164
167
 
165
168
  ### Attributes
166
169
 
167
170
  - `param-name` - the name of the HTTP parameter to use for the filter
168
- - `options` - an array of options for the menu.
171
+ - `options` - an array of options or an array of arrays (useful for localized apps) for the menu.
172
+ It can be omitted if you provide the options as an array or array of arrays in the locale file.
169
173
  - `no-filter` - The text of the first option which indicates no filter is in effect. Defaults to 'All'
174
+ - `first-value` - the value to be used with the first option. Typically not used,
175
+ meaning the option has a blank value.
176
+ - model - the model name (optional: needed if you use the "activerecord.attributes" namespace.
177
+
178
+ ### I18n
179
+
180
+ It lookups the options attributes in "activerecord.attributes.#{model}.filter_menu.#{param\_name}.options"
181
+ with fallback to "filter_menu.#{param_name}.options".
182
+ The passed options are used as a default in case the lookup fails.
183
+ Besides the "activerecord.attributes.#{model}.filter_menu.#{param_name}.no_filter" or
184
+ "tags.filter_menu.default.no_filter" key is used as default of the attribute "no-filter"
185
+ (or "All" if no default is found)
186
+
187
+ ### I18n Example
188
+
189
+
190
+ es:
191
+ activerecord:
192
+ attributes:
193
+ <model_name>:
194
+ filter_menu:
195
+ period:
196
+ no_filter: Todos Períodos
197
+ options:
198
+ - [ "Hoy", "today" ]
199
+ - [ "Ayer", "yesterday" ]
200
+
201
+ or
202
+
203
+ es:
204
+ tags:
205
+ filter_menu:
206
+ period:
207
+ no_filter: Todos Períodos
208
+ options:
209
+ - [ "Hoy", "today" ]
210
+ - [ "Ayer", "yesterday" ]
211
+
212
+ TIME_PERIODS = %w[today yesterday]
213
+
214
+ <t-filter-menu param-name="period" options="&TIME_PERIODS" no-filter="All Periods"/>
215
+
216
+ with I18n.locale == :es
217
+ <select name="period">
218
+ <option value="">Todos Períodos</option>
219
+ <option value="today">Hoy</option>
220
+ <option value="yesterday">Ayer</option>
221
+ </select>
222
+
223
+ with I18n.locale == :en (i.e no locale file)
224
+ <select name="period">
225
+ <option value="">All Periods</option>
226
+ <option value="today">today</option>
227
+ <option value="yesterday">yesterday</option>
228
+ </select>
229
+
170
230
  -->
171
- <def tag="filter-menu" attrs="param-name, options, no-filter, id">
172
- <% no_filter ||= "All" %>
173
- <form action="&request.request_uri" method="get" class="filter-menu" merge-attrs="id">
231
+ <def tag="filter-menu" attrs="model, param-name, options, no-filter, id, first-value">
232
+ <% options = t("activerecord.attributes.#{model}.filter_menu.#{param_name}.options", :default=>[:"tags.filter_menu.#{param_name}.options", options])
233
+ raise ArgumentError, %(You must provide an "options" attribute, or set "activerecord.attributes.#{model}.filter_menu.#{param_name}.options" or "tags.filter_menu.#{param_name}.options" to an Array or to an Array of Arrays
234
+ in your locale file(s)) unless options.is_a?(Array)
235
+ no_filter = t("activerecord.attributes.#{model}.filter_menu.#{param_name}.no_filter", :default=>[:"tags.filter_menu.#{param_name}.no_filter", :"tags.filter_menu.default.no_filter", no_filter, "All"]) %>
236
+ <form action="&request.fullpath" method="get" class="filter-menu" merge-attrs="id">
174
237
  <div>
175
- <% selected = options.detect {|o| o.is_a?(Array) ? o[1].to_s==params[param_name.gsub('-', '_')] : o.to_s==params[param_name.gsub('-', '_')] } %>
238
+ <% opt = options.first.kind_of?(Array) ? options.*.last : options
239
+ selected = opt.detect {|o| o.to_s==params[param_name.gsub('-', '_')] } %>
176
240
  <select-menu name="&param_name" options="&options" selected="&selected"
177
- first-option="&no_filter" merge-params/>
241
+ first-option="&no_filter" first-value="&first_value" key="&param_name" merge-params/>
178
242
  </div>
179
243
  </form>
180
244
  </def>
@@ -5,26 +5,21 @@
5
5
  <%= Rails.version -%>
6
6
  </def>
7
7
 
8
- <!-- returns "vendor" or "gem" -->
9
- <def tag="rails-location">
10
- <%= Rails.vendor_rails? ? "vendor" : "gem" -%>
11
- </def>
12
-
13
- <!-- `RAILS_ROOT` -->
8
+ <!-- `Rails.root` -->
14
9
  <def tag="rails-root">
15
- <%= RAILS_ROOT -%>
10
+ <%= Rails.root -%>
16
11
  </def>
17
12
 
18
13
  <!-- `RAILS_ENV` -->
19
14
  <def tag="rails-env">
20
- <%= RAILS_ENV -%>
15
+ <%= Rails.env -%>
21
16
  </def>
22
17
 
23
18
  <!-- Which change management system is in use: "git" "subversion" "other" -->
24
19
  <def tag="cms-method">
25
- <%= if File.exist?("#{RAILS_ROOT}/.git")
20
+ <%= if File.exist?("#{Rails.root}/.git")
26
21
  "git"
27
- elsif File.exist?("#{RAILS_ROOT}/.svn")
22
+ elsif File.exist?("#{Rails.root}/.svn")
28
23
  "subversion"
29
24
  else
30
25
  "other"
@@ -38,19 +33,19 @@
38
33
 
39
34
  <!-- the git version currently in use -->
40
35
  <def tag="git-version" attrs="dir">
41
- <% dir=RAILS_ROOT if dir.blank? -%>
42
- <%= Dir.chdir(dir) {`git rev-list "HEAD^..HEAD" --abbrev-commit --abbrev=7`} -%>
36
+ <% dir=Rails.root if dir.blank? -%>
37
+ <%= Dir.chdir(dir) {`git rev-parse --verify HEAD --short=7`} -%>
43
38
  </def>
44
39
 
45
- <!-- returns 'clean' if there are no modified files, 'modified' otherwise. -->
40
+ <!-- returns 'clean' if there are no modified or added files, 'dirty' otherwise. -->
46
41
  <def tag="git-clean" attrs="dir">
47
- <% dir=RAILS_ROOT if dir.blank? -%>
48
- <%= Dir.chdir(dir) {`git ls-files -m`}.blank? ? "clean" : "modified" -%>
42
+ <% dir=Rails.root if dir.blank? -%>
43
+ <%= Dir.chdir(dir) {`git status -s`}.blank? ? "clean" : "dirty" -%>
49
44
  </def>
50
45
 
51
46
  <!-- the time & date of the last commit -->
52
47
  <def tag="git-last-commit-time">
53
- <%= `git log "HEAD^..HEAD" --pretty=format:%cD` -%>
48
+ <%= `git log -1 --format=%cD` -%>
54
49
  </def>
55
50
 
56
51
  <!-- calls `git-clean` or `svn-clean` as appropriate. `svn-clean` not yet written. -->
@@ -84,13 +79,7 @@
84
79
 
85
80
  <!-- repeats on Rails.configuration.gems, including dependent gems -->
86
81
  <def tag="with-gems">
87
- <% gems = ActiveSupport::OrderedHash.new -%>
88
- <% Rails.configuration.gems.each do |gem|
89
- gems[name] ||= gem
90
- gem.dependencies.each do |dep|
91
- gems[dep] ||= dep
92
- end
93
- end -%>
82
+ <% gems = Bundler::LockfileParser.new(File.read('Gemfile.lock')).specs -%>
94
83
  <repeat with="&gems">
95
84
  <do param="default"/>
96
85
  </repeat>
@@ -101,37 +90,19 @@
101
90
  <%= this.name -%>
102
91
  </def>
103
92
 
104
- <def tag="gem-version-requirement">
105
- <unless test="this.nil?"><%=
106
- this.requirements.map{|l| l.first+l.second.to_s}.join(",")
107
- -%></unless>
108
- </def>
109
-
110
- <!-- inside `<with-gems>`, returns the version required -->
111
- <def tag="gem-version-required">
112
- <gem-version-requirement:version-requirements />
113
- </def>
114
-
115
93
  <!-- inside `<with-gems>`, returns the version -->
116
94
  <def tag="gem-version">
117
- <%= this.specification.version.to_s -%>
118
- </def>
119
-
120
- <!-- inside `<with-gems>`, returns 'frozen', 'installed' or 'missing' -->
121
- <def tag="gem-frozen">
122
- <%= this.frozen? ? "frozen" : (this.installed? ? "installed" : "missing") -%>
95
+ <%= this.version.to_s -%>
123
96
  </def>
124
97
 
125
98
  <!-- inside `<with-gems>`, returns the gem dependencies -->
126
99
  <def tag="gem-dependencies">
127
- <repeat with="&this.dependencies">
128
- <%= this.name -%><gem-version-requirement with="&this.requirement || this.version_requirements" />
129
- </repeat>
100
+ <%= this.dependencies(&it.to_s).safe_join('<br>'.html_safe) -%>
130
101
  </def>
131
102
 
132
103
  <!-- repeats on the plugins used by the application -->
133
104
  <def tag="with-plugins">
134
- <% plugins = Rails.configuration.plugin_loader.new(Hobo.rails_initializer).plugins %>
105
+ <% plugins = Rails.application.railties.plugins %>
135
106
  <repeat with="&plugins">
136
107
  <do param="default" />
137
108
  </repeat>
@@ -139,31 +110,31 @@
139
110
 
140
111
  <!-- within `<with-plugins>`, returns the plugin name -->
141
112
  <def tag="plugin-name">
142
- <%= this.name -%>
113
+ <%= this.name.to_s -%>
143
114
  </def>
144
115
 
145
116
  <!-- within `<with-plugins>`, returns the plugin location (directory) -->
146
117
  <def tag="plugin-location">
147
- <%= this.directory -%>
118
+ <%= this.root.to_s -%>
148
119
  </def>
149
120
 
150
121
  <def tag="plugin-git-clean">
151
- <git-clean dir="&this.directory"/>
122
+ <git-clean dir="&this.root.to_s"/>
152
123
  </def>
153
124
 
154
125
  <def tag="plugin-git-version">
155
- <git-version dir="&this.directory"/>
126
+ <git-version dir="&this.root.to_s"/>
156
127
  </def>
157
128
 
158
129
  <!-- within `<with-plugins>`, try and determine the method that was used to install the plugin. Returns "braid", "symlink", "git-submodule" or "other" -->
159
130
  <def tag="plugin-method">
160
- <%=
161
- braids = File.open("#{RAILS_ROOT}/.braids") {|f| YAML::load(f) } rescue {}
162
- if !braids[this.directory.gsub(RAILS_ROOT+"/", "")].nil?
131
+ <%=
132
+ braids = File.open("#{Rails.root}/.braids") {|f| YAML::load(f) } rescue {}
133
+ if !braids[this.root.to_s.gsub(Rails.root.to_s+"/", "")].nil?
163
134
  "braid"
164
- elsif File.lstat(this.directory).symlink?
135
+ elsif File.lstat(this.root.to_s).symlink?
165
136
  "symlink"
166
- elsif File.exist?(this.directory+"/.git")
137
+ elsif File.exist?(this.root.to_s+"/.git")
167
138
  "git-submodule"
168
139
  else
169
140
  "other"
@@ -186,13 +157,13 @@
186
157
  </def>
187
158
 
188
159
  <def tag="plugin-braid-clean">
189
- <%= diff=`braid diff #{this.directory.gsub(RAILS_ROOT+"/", "")}`
160
+ <%= diff=`braid diff #{this.directory.gsub(Rails.root+"/", "")}`
190
161
  diff.strip.empty? ? "clean" : "modified" -%>
191
162
  </def>
192
163
 
193
164
  <def tag="plugin-braid-version">
194
- <%= braids = File.open("#{RAILS_ROOT}/.braids") {|f| YAML::load(f) } rescue {}
195
- b=braids[this.directory.gsub(RAILS_ROOT+"/", "")]
165
+ <%= braids = File.open("#{Rails.root}/.braids") {|f| YAML::load(f) } rescue {}
166
+ b=braids[this.directory.gsub(Rails.root+"/", "")]
196
167
  b['revision'][0...7] if b -%>
197
168
  </def>
198
169
 
@@ -305,7 +276,7 @@
305
276
  end -%>
306
277
  </def>
307
278
 
308
- <!-- given an association, return the name -->
279
+ <!-- given an association, return the name -->
309
280
  <def tag="model-association-class-name">
310
281
  <%= (this.class_name.try.respond_to? 'underscore') ? this.class_name.underscore.singularize.camelize : this.try.class_name -%>
311
282
  </def>
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  <!-- Call with the context set to a record. Repeats the content of the tag with `this` and `this_field` set to the value and name of each of the record's fields in turn. E.g. this is useful for generating a form containing each of the fields. Tags like `<field-list>` and `<table>` forward their attributes to this tag and also have the features described here. For example, the `fields` attribute to `<field-list>` supports the same options as described here.
5
-
5
+
6
6
  This tag is in need of a review - it's a bit funky.
7
7
 
8
8
  ### Attributes
@@ -17,14 +17,14 @@ This tag is in need of a review - it's a bit funky.
17
17
  - `skip-associations` - set to `has-many` to omit all `has_many` associations.
18
18
  - `include-timestamps` - whether or not to include the standard ActiveRecord timestamp fields such as `created_at` and `updated_at`. Defaults to false.
19
19
  - `force-all` - by default fields are skipped if the current user does not have view permission. Set `force-all` to true to skip this permission check and include all the fields.
20
-
20
+
21
21
  -->
22
22
  <def tag="with-fields" attrs="fields, associations, skip, skip-associations, include-timestamps, force-all"><%
23
23
  fields.nil? || associations.nil? or raise ArgumentError, "with-fields -- specify either fields or associations but not both"
24
-
24
+
25
25
  field_names = if associations == "has_many"
26
26
  this.class.reflections.values.select { |refl| refl.macro == :has_many }.map { |refl| refl.name.to_s }
27
-
27
+
28
28
  elsif fields.nil? || fields == "*" || fields.is_a?(Class)
29
29
  klass = fields.is_a?(Class) ? fields : this.class
30
30
  columns = standard_fields(klass, include_timestamps)
@@ -43,7 +43,7 @@ This tag is in need of a review - it's a bit funky.
43
43
  end
44
44
  field_names -= comma_split(skip) if skip
45
45
  field_names = field_names.select {|f| can_view?(this, f)} unless force_all
46
- field_names.each do |field|
46
+ field_names.each do |field|
47
47
  %><set-scoped field-name="&field"><%
48
48
  if field == "this"
49
49
  %><do param="default"/><%
@@ -55,7 +55,7 @@ This tag is in need of a review - it's a bit funky.
55
55
  %></def>
56
56
 
57
57
  <!-- Call with the context set to a model class. Repeats the content of the tag with `this` set name of each of the model's fields in turn. E.g. this tag is used when generating the heading row in a `<table fields='...'/>`.
58
-
58
+
59
59
  This tag is in need of a review - it's a bit funky.
60
60
 
61
61
  ### Attributes
@@ -68,7 +68,7 @@ This tag is in need of a review - it's a bit funky.
68
68
  - `skip` - comma separated list of field names to omit.
69
69
  - `skip-associations` - set to `has-many` to omit all `has_many` associations.
70
70
  - `include-timestamps` - whether or not to include the standard ActiveRecord timestamp fields such as `created_at` and `updated_at`. Defaults to false.
71
-
71
+
72
72
  -->
73
73
  <def tag="with-field-names" attrs="fields, skip, skip-associations, include-timestamps"><%=
74
74
  field_names = if fields.nil? || fields == "*" || fields.is_a?(Class)
@@ -92,10 +92,10 @@ This tag is in need of a review - it's a bit funky.
92
92
  field_names -= comma_split(skip) if skip
93
93
  scope.new_scope :field_name => nil, :field_path => nil do
94
94
  field_names.map do |n|
95
- scope.field_name = n == "this" ? this.member_class.try.name : n.to_s.gsub("." , "_")
95
+ scope.field_name = n == "this" ? this.member_class.try.name : n.to_s.gsub("." , "_")
96
96
  scope.field_path = n
97
97
  parameters.default
98
- end.join
98
+ end.safe_join
99
99
  end
100
100
  %>
101
101
  </def>