wallaby 5.0.1 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -3
  3. data/app/assets/images/wallaby/404.png +0 -0
  4. data/app/assets/images/wallaby/422.png +0 -0
  5. data/app/assets/images/wallaby/500.png +0 -0
  6. data/app/assets/javascripts/wallaby/application.js +1 -15
  7. data/app/assets/javascripts/wallaby/auto_select.js +77 -0
  8. data/app/assets/javascripts/wallaby/base.js +17 -0
  9. data/app/assets/javascripts/wallaby/setup.js.erb +60 -0
  10. data/app/assets/stylesheets/wallaby/application.scss +1 -51
  11. data/app/assets/stylesheets/wallaby/base/_layout.scss +257 -9
  12. data/app/assets/stylesheets/wallaby/base/_layout_desktop.scss +53 -0
  13. data/app/assets/stylesheets/wallaby/base/_mixins.scss +119 -0
  14. data/app/assets/stylesheets/wallaby/base/_override.scss +10 -0
  15. data/app/assets/stylesheets/wallaby/base/_vars.scss +72 -2
  16. data/app/assets/stylesheets/wallaby/base.scss +27 -0
  17. data/app/assets/stylesheets/wallaby/components/_auto_select.scss +119 -0
  18. data/app/assets/stylesheets/wallaby/components/_auto_select_desktop.scss +7 -0
  19. data/app/assets/stylesheets/wallaby/components/_color_square.scss +8 -0
  20. data/app/assets/stylesheets/wallaby/components/_filters.scss +14 -0
  21. data/app/assets/stylesheets/wallaby/components/_links.scss +25 -0
  22. data/app/assets/stylesheets/wallaby/components/_pagination.scss +35 -91
  23. data/app/assets/stylesheets/wallaby/components/_query.scss +101 -0
  24. data/app/assets/stylesheets/wallaby/components/_text.scss +6 -6
  25. data/app/assets/stylesheets/wallaby/pages/_error.scss +108 -0
  26. data/app/assets/stylesheets/wallaby/pages/_form.scss +40 -0
  27. data/app/assets/stylesheets/wallaby/pages/_index.scss +193 -0
  28. data/app/assets/stylesheets/wallaby/pages/_index_desktop.scss +22 -0
  29. data/app/assets/stylesheets/wallaby/pages/_show.scss +21 -0
  30. data/app/controllers/wallaby/abstract_resources_controller.rb +334 -0
  31. data/app/controllers/wallaby/application_controller.rb +45 -15
  32. data/app/controllers/wallaby/base_controller.rb +30 -0
  33. data/app/controllers/wallaby/resources_controller.rb +2 -131
  34. data/app/controllers/wallaby/secure_controller.rb +38 -24
  35. data/app/routes/wallaby/resources_router.rb +40 -43
  36. data/app/security/ability.rb +4 -28
  37. data/app/views/layouts/wallaby/application.html.erb +11 -6
  38. data/app/views/layouts/wallaby/error.html.erb +26 -4
  39. data/app/views/wallaby/error.html.erb +11 -0
  40. data/app/views/wallaby/error.json.jbuilder +8 -0
  41. data/app/views/wallaby/{shared → resources}/_flash_messages.html.erb +0 -0
  42. data/app/views/wallaby/resources/_footer.html.erb +1 -0
  43. data/app/views/wallaby/resources/_form.html.erb +2 -2
  44. data/app/views/wallaby/resources/_header.html.erb +38 -0
  45. data/app/views/wallaby/resources/_imodal.html.erb +13 -0
  46. data/app/views/wallaby/resources/_index_actions.html.erb +4 -1
  47. data/app/views/wallaby/resources/_index_filters.html.erb +23 -0
  48. data/app/views/wallaby/resources/_index_pagination.html.erb +63 -0
  49. data/app/views/wallaby/resources/_index_query.html.erb +23 -0
  50. data/app/views/wallaby/resources/_logo.html.erb +1 -0
  51. data/app/views/wallaby/resources/_navs.html.erb +9 -0
  52. data/app/views/wallaby/resources/_resource_actions.html.erb +3 -3
  53. data/app/views/wallaby/resources/{shared/_resource_nav.html.erb → _resource_navs.html.erb} +6 -6
  54. data/app/views/wallaby/resources/_title.html.erb +1 -0
  55. data/app/views/wallaby/resources/_user_menu.html.erb +5 -0
  56. data/app/views/wallaby/resources/bad_request.json.jbuilder +7 -0
  57. data/app/views/wallaby/resources/edit.html.erb +16 -12
  58. data/app/views/wallaby/resources/form/_belongs_to.html.erb +63 -12
  59. data/app/views/wallaby/resources/form/_bigint.html.erb +10 -1
  60. data/app/views/wallaby/resources/form/_bigserial.html.erb +18 -0
  61. data/app/views/wallaby/resources/form/_binary.html.erb +11 -2
  62. data/app/views/wallaby/resources/form/_bit.html.erb +10 -1
  63. data/app/views/wallaby/resources/form/_bit_varying.html.erb +10 -1
  64. data/app/views/wallaby/resources/form/_blob.html.erb +21 -0
  65. data/app/views/wallaby/resources/form/_boolean.html.erb +9 -0
  66. data/app/views/wallaby/resources/form/_box.html.erb +21 -0
  67. data/app/views/wallaby/resources/form/_cidr.html.erb +13 -1
  68. data/app/views/wallaby/resources/form/_circle.html.erb +21 -0
  69. data/app/views/wallaby/resources/form/_citext.html.erb +11 -2
  70. data/app/views/wallaby/resources/form/_color.html.erb +11 -2
  71. data/app/views/wallaby/resources/form/_date.html.erb +12 -3
  72. data/app/views/wallaby/resources/form/_daterange.html.erb +14 -5
  73. data/app/views/wallaby/resources/form/_datetime.html.erb +12 -3
  74. data/app/views/wallaby/resources/form/_decimal.html.erb +10 -1
  75. data/app/views/wallaby/resources/form/_dropdown.html.erb +18 -0
  76. data/app/views/wallaby/resources/form/_email.html.erb +9 -0
  77. data/app/views/wallaby/resources/form/_file.html.erb +21 -0
  78. data/app/views/wallaby/resources/form/_float.html.erb +10 -1
  79. data/app/views/wallaby/resources/form/_has_and_belongs_to_many.html.erb +53 -7
  80. data/app/views/wallaby/resources/form/_has_many.html.erb +52 -7
  81. data/app/views/wallaby/resources/form/_has_one.html.erb +10 -2
  82. data/app/views/wallaby/resources/form/_hstore.html.erb +12 -5
  83. data/app/views/wallaby/resources/form/_inet.html.erb +13 -1
  84. data/app/views/wallaby/resources/form/_int4range.html.erb +11 -2
  85. data/app/views/wallaby/resources/form/_int8range.html.erb +11 -2
  86. data/app/views/wallaby/resources/form/_integer.html.erb +10 -1
  87. data/app/views/wallaby/resources/form/_json.html.erb +13 -6
  88. data/app/views/wallaby/resources/form/_jsonb.html.erb +13 -6
  89. data/app/views/wallaby/resources/form/_line.html.erb +21 -0
  90. data/app/views/wallaby/resources/form/_longblob.html.erb +21 -0
  91. data/app/views/wallaby/resources/form/_longtext.html.erb +30 -0
  92. data/app/views/wallaby/resources/form/_lseg.html.erb +21 -0
  93. data/app/views/wallaby/resources/form/_ltree.html.erb +17 -1
  94. data/app/views/wallaby/resources/form/_macaddr.html.erb +13 -1
  95. data/app/views/wallaby/resources/form/_markdown.html.erb +29 -0
  96. data/app/views/wallaby/resources/form/_mediumblob.html.erb +21 -0
  97. data/app/views/wallaby/resources/form/_mediumtext.html.erb +30 -0
  98. data/app/views/wallaby/resources/form/_money.html.erb +10 -1
  99. data/app/views/wallaby/resources/form/_numrange.html.erb +11 -2
  100. data/app/views/wallaby/resources/form/_password.html.erb +14 -1
  101. data/app/views/wallaby/resources/form/_path.html.erb +17 -0
  102. data/app/views/wallaby/resources/form/_point.html.erb +11 -2
  103. data/app/views/wallaby/resources/form/_polygon.html.erb +17 -0
  104. data/app/views/wallaby/resources/form/_serial.html.erb +18 -0
  105. data/app/views/wallaby/resources/form/_sti.html.erb +18 -0
  106. data/app/views/wallaby/resources/form/_string.html.erb +14 -1
  107. data/app/views/wallaby/resources/form/_text.html.erb +11 -2
  108. data/app/views/wallaby/resources/form/_time.html.erb +12 -3
  109. data/app/views/wallaby/resources/form/_tinyblob.html.erb +21 -0
  110. data/app/views/wallaby/resources/form/_tinytext.html.erb +30 -0
  111. data/app/views/wallaby/resources/form/_tsrange.html.erb +14 -5
  112. data/app/views/wallaby/resources/form/_tstzrange.html.erb +14 -5
  113. data/app/views/wallaby/resources/form/_tsvector.html.erb +9 -0
  114. data/app/views/wallaby/resources/form/_unsigned_bigint.html.erb +18 -0
  115. data/app/views/wallaby/resources/form/_unsigned_decimal.html.erb +18 -0
  116. data/app/views/wallaby/resources/form/_unsigned_float.html.erb +18 -0
  117. data/app/views/wallaby/resources/form/_unsigned_integer.html.erb +18 -0
  118. data/app/views/wallaby/resources/form/_uuid.html.erb +10 -1
  119. data/app/views/wallaby/resources/form/_xml.html.erb +11 -5
  120. data/app/views/wallaby/resources/form.json.jbuilder +5 -0
  121. data/app/views/wallaby/{core → resources}/home.html.erb +1 -1
  122. data/app/views/wallaby/resources/index/_belongs_to.html.erb +5 -1
  123. data/app/views/wallaby/resources/index/_bigint.html.erb +4 -0
  124. data/app/views/wallaby/resources/index/_bigserial.html.erb +5 -0
  125. data/app/views/wallaby/resources/index/_binary.html.erb +5 -1
  126. data/app/views/wallaby/resources/index/_bit.html.erb +4 -0
  127. data/app/views/wallaby/resources/index/_bit_varying.html.erb +4 -0
  128. data/app/views/wallaby/resources/index/_blob.html.erb +5 -0
  129. data/app/views/wallaby/resources/index/_boolean.html.erb +5 -1
  130. data/app/views/wallaby/resources/index/_box.html.erb +16 -0
  131. data/app/views/wallaby/resources/index/_cidr.html.erb +5 -1
  132. data/app/views/wallaby/resources/index/_circle.html.erb +16 -0
  133. data/app/views/wallaby/resources/index/_citext.html.erb +5 -1
  134. data/app/views/wallaby/resources/index/_color.html.erb +6 -1
  135. data/app/views/wallaby/resources/index/_date.html.erb +4 -0
  136. data/app/views/wallaby/resources/index/_daterange.html.erb +5 -1
  137. data/app/views/wallaby/resources/index/_datetime.html.erb +5 -1
  138. data/app/views/wallaby/resources/index/_decimal.html.erb +4 -0
  139. data/app/views/wallaby/resources/index/_email.html.erb +4 -0
  140. data/app/views/wallaby/resources/index/_float.html.erb +4 -0
  141. data/app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb +6 -2
  142. data/app/views/wallaby/resources/index/_has_many.html.erb +6 -2
  143. data/app/views/wallaby/resources/index/_has_one.html.erb +5 -1
  144. data/app/views/wallaby/resources/index/_hstore.html.erb +6 -2
  145. data/app/views/wallaby/resources/index/_inet.html.erb +5 -1
  146. data/app/views/wallaby/resources/index/_int4range.html.erb +4 -0
  147. data/app/views/wallaby/resources/index/_int8range.html.erb +4 -0
  148. data/app/views/wallaby/resources/index/_integer.html.erb +4 -0
  149. data/app/views/wallaby/resources/index/_json.html.erb +5 -2
  150. data/app/views/wallaby/resources/index/_jsonb.html.erb +5 -2
  151. data/app/views/wallaby/resources/index/_line.html.erb +16 -0
  152. data/app/views/wallaby/resources/index/_longblob.html.erb +5 -0
  153. data/app/views/wallaby/resources/index/_longtext.html.erb +16 -0
  154. data/app/views/wallaby/resources/index/_lseg.html.erb +16 -0
  155. data/app/views/wallaby/resources/index/_ltree.html.erb +5 -1
  156. data/app/views/wallaby/resources/index/_macaddr.html.erb +4 -0
  157. data/app/views/wallaby/resources/index/_mediumblob.html.erb +5 -0
  158. data/app/views/wallaby/resources/index/_mediumtext.html.erb +16 -0
  159. data/app/views/wallaby/resources/index/_money.html.erb +4 -0
  160. data/app/views/wallaby/resources/index/_numrange.html.erb +4 -0
  161. data/app/views/wallaby/resources/index/_password.html.erb +9 -0
  162. data/app/views/wallaby/resources/index/_path.html.erb +16 -0
  163. data/app/views/wallaby/resources/index/_point.html.erb +4 -0
  164. data/app/views/wallaby/resources/index/_polygon.html.erb +16 -0
  165. data/app/views/wallaby/resources/index/_raw.html.erb +9 -0
  166. data/app/views/wallaby/resources/index/_serial.html.erb +5 -0
  167. data/app/views/wallaby/resources/index/_sti.html.erb +16 -0
  168. data/app/views/wallaby/resources/index/_string.html.erb +5 -1
  169. data/app/views/wallaby/resources/index/_text.html.erb +5 -1
  170. data/app/views/wallaby/resources/index/_time.html.erb +4 -0
  171. data/app/views/wallaby/resources/index/_tinyblob.html.erb +5 -0
  172. data/app/views/wallaby/resources/index/_tinytext.html.erb +16 -0
  173. data/app/views/wallaby/resources/index/_tsrange.html.erb +5 -1
  174. data/app/views/wallaby/resources/index/_tstzrange.html.erb +5 -1
  175. data/app/views/wallaby/resources/index/_tsvector.html.erb +5 -1
  176. data/app/views/wallaby/resources/index/_unsigned_bigint.html.erb +5 -0
  177. data/app/views/wallaby/resources/index/_unsigned_decimal.html.erb +5 -0
  178. data/app/views/wallaby/resources/index/_unsigned_float.html.erb +5 -0
  179. data/app/views/wallaby/resources/index/_unsigned_integer.html.erb +5 -0
  180. data/app/views/wallaby/resources/index/_uuid.html.erb +5 -1
  181. data/app/views/wallaby/resources/index/_xml.html.erb +5 -1
  182. data/app/views/wallaby/resources/index.csv.erb +26 -0
  183. data/app/views/wallaby/resources/index.html.erb +47 -59
  184. data/app/views/wallaby/resources/index.json.jbuilder +5 -0
  185. data/app/views/wallaby/resources/new.html.erb +12 -11
  186. data/app/views/wallaby/resources/show/_belongs_to.html.erb +5 -1
  187. data/app/views/wallaby/resources/show/_bigint.html.erb +4 -0
  188. data/app/views/wallaby/resources/show/_bigserial.html.erb +5 -0
  189. data/app/views/wallaby/resources/show/_binary.html.erb +5 -1
  190. data/app/views/wallaby/resources/show/_bit.html.erb +4 -0
  191. data/app/views/wallaby/resources/show/_bit_varying.html.erb +4 -0
  192. data/app/views/wallaby/resources/show/_blob.html.erb +5 -0
  193. data/app/views/wallaby/resources/show/_boolean.html.erb +5 -1
  194. data/app/views/wallaby/resources/show/_box.html.erb +9 -0
  195. data/app/views/wallaby/resources/show/_cidr.html.erb +5 -1
  196. data/app/views/wallaby/resources/show/_circle.html.erb +9 -0
  197. data/app/views/wallaby/resources/show/_citext.html.erb +4 -0
  198. data/app/views/wallaby/resources/show/_color.html.erb +6 -1
  199. data/app/views/wallaby/resources/show/_date.html.erb +4 -0
  200. data/app/views/wallaby/resources/show/_daterange.html.erb +4 -0
  201. data/app/views/wallaby/resources/show/_datetime.html.erb +4 -0
  202. data/app/views/wallaby/resources/show/_decimal.html.erb +4 -0
  203. data/app/views/wallaby/resources/show/_email.html.erb +4 -0
  204. data/app/views/wallaby/resources/show/_float.html.erb +4 -0
  205. data/app/views/wallaby/resources/show/_has_and_belongs_to_many.html.erb +6 -2
  206. data/app/views/wallaby/resources/show/_has_many.html.erb +6 -2
  207. data/app/views/wallaby/resources/show/_has_one.html.erb +5 -1
  208. data/app/views/wallaby/resources/show/_hstore.html.erb +4 -0
  209. data/app/views/wallaby/resources/show/_image.html.erb +9 -0
  210. data/app/views/wallaby/resources/show/_inet.html.erb +5 -1
  211. data/app/views/wallaby/resources/show/_int4range.html.erb +4 -0
  212. data/app/views/wallaby/resources/show/_int8range.html.erb +4 -0
  213. data/app/views/wallaby/resources/show/_integer.html.erb +4 -0
  214. data/app/views/wallaby/resources/show/_json.html.erb +4 -0
  215. data/app/views/wallaby/resources/show/_jsonb.html.erb +4 -0
  216. data/app/views/wallaby/resources/show/_line.html.erb +9 -0
  217. data/app/views/wallaby/resources/show/_longblob.html.erb +5 -0
  218. data/app/views/wallaby/resources/show/_longtext.html.erb +5 -0
  219. data/app/views/wallaby/resources/show/_lseg.html.erb +9 -0
  220. data/app/views/wallaby/resources/show/_ltree.html.erb +4 -0
  221. data/app/views/wallaby/resources/show/_macaddr.html.erb +4 -0
  222. data/app/views/wallaby/resources/show/_mediumblob.html.erb +5 -0
  223. data/app/views/wallaby/resources/show/_mediumtext.html.erb +5 -0
  224. data/app/views/wallaby/resources/show/_money.html.erb +4 -0
  225. data/app/views/wallaby/resources/show/_numrange.html.erb +4 -0
  226. data/app/views/wallaby/resources/show/_password.html.erb +9 -0
  227. data/app/views/wallaby/resources/show/_path.html.erb +9 -0
  228. data/app/views/wallaby/resources/show/_point.html.erb +4 -0
  229. data/app/views/wallaby/resources/show/_polygon.html.erb +9 -0
  230. data/app/views/wallaby/resources/show/_raw.html.erb +9 -0
  231. data/app/views/wallaby/resources/show/_serial.html.erb +5 -0
  232. data/app/views/wallaby/resources/show/_sti.html.erb +5 -0
  233. data/app/views/wallaby/resources/show/_string.html.erb +4 -0
  234. data/app/views/wallaby/resources/show/_text.html.erb +4 -0
  235. data/app/views/wallaby/resources/show/_time.html.erb +4 -0
  236. data/app/views/wallaby/resources/show/_tinyblob.html.erb +5 -0
  237. data/app/views/wallaby/resources/show/_tinytext.html.erb +5 -0
  238. data/app/views/wallaby/resources/show/_tsrange.html.erb +4 -0
  239. data/app/views/wallaby/resources/show/_tstzrange.html.erb +4 -0
  240. data/app/views/wallaby/resources/show/_tsvector.html.erb +4 -0
  241. data/app/views/wallaby/resources/show/_unsigned_bigint.html.erb +5 -0
  242. data/app/views/wallaby/resources/show/_unsigned_decimal.html.erb +5 -0
  243. data/app/views/wallaby/resources/show/_unsigned_float.html.erb +5 -0
  244. data/app/views/wallaby/resources/show/_unsigned_integer.html.erb +5 -0
  245. data/app/views/wallaby/resources/show/_uuid.html.erb +4 -0
  246. data/app/views/wallaby/resources/show/_xml.html.erb +4 -0
  247. data/app/views/wallaby/resources/show.html.erb +14 -24
  248. data/app/views/wallaby/resources/show.json.jbuilder +5 -0
  249. data/config/brakeman.ignore +26 -0
  250. data/config/locales/wallaby.en.yml +91 -0
  251. data/config/massa.yml +45 -0
  252. data/config/rails_best_practices.yml +42 -0
  253. data/config/routes.rb +29 -23
  254. data/lib/adaptors/wallaby/active_record/model_decorator/fields_builder/association_builder.rb +39 -0
  255. data/lib/adaptors/wallaby/active_record/model_decorator/fields_builder/polymorphic_builder.rb +44 -0
  256. data/lib/adaptors/wallaby/active_record/model_decorator/fields_builder/sti_builder.rb +42 -0
  257. data/lib/adaptors/wallaby/active_record/model_decorator/fields_builder.rb +41 -94
  258. data/lib/adaptors/wallaby/active_record/model_decorator/title_field_finder.rb +24 -14
  259. data/lib/adaptors/wallaby/active_record/model_decorator.rb +118 -64
  260. data/lib/adaptors/wallaby/active_record/model_finder.rb +44 -15
  261. data/lib/adaptors/wallaby/active_record/model_pagination_provider.rb +30 -0
  262. data/lib/adaptors/wallaby/active_record/model_service_provider/normalizer.rb +42 -0
  263. data/lib/adaptors/wallaby/active_record/model_service_provider/permitter.rb +64 -0
  264. data/lib/adaptors/wallaby/active_record/model_service_provider/querier/transformer.rb +70 -0
  265. data/lib/adaptors/wallaby/active_record/model_service_provider/querier.rb +102 -0
  266. data/lib/adaptors/wallaby/active_record/model_service_provider/validator.rb +29 -0
  267. data/lib/adaptors/wallaby/active_record/model_service_provider.rb +137 -0
  268. data/lib/adaptors/wallaby/active_record.rb +4 -1
  269. data/lib/decorators/wallaby/abstract_resource_decorator.rb +74 -0
  270. data/lib/decorators/wallaby/resource_decorator.rb +5 -76
  271. data/lib/errors/wallaby/model_not_found.rb +5 -1
  272. data/lib/errors/wallaby/not_found.rb +4 -0
  273. data/lib/errors/wallaby/resource_not_found.rb +5 -1
  274. data/lib/forms/wallaby/form_builder.rb +42 -19
  275. data/lib/helpers/wallaby/application_helper.rb +34 -24
  276. data/lib/helpers/wallaby/base_helper.rb +52 -0
  277. data/lib/helpers/wallaby/form_helper.rb +40 -16
  278. data/lib/helpers/wallaby/index_helper.rb +59 -0
  279. data/lib/helpers/wallaby/links_helper.rb +150 -81
  280. data/lib/helpers/wallaby/resources_helper.rb +41 -46
  281. data/lib/helpers/wallaby/secure_helper.rb +36 -19
  282. data/lib/helpers/wallaby/styling_helper.rb +53 -44
  283. data/lib/interfaces/wallaby/mode.rb +19 -12
  284. data/lib/interfaces/wallaby/model_decorator.rb +176 -50
  285. data/lib/interfaces/wallaby/model_finder.rb +7 -3
  286. data/lib/interfaces/wallaby/model_pagination_provider.rb +104 -0
  287. data/lib/interfaces/wallaby/model_service_provider.rb +71 -0
  288. data/lib/paginators/wallaby/abstract_resource_paginator.rb +23 -0
  289. data/lib/paginators/wallaby/resource_paginator.rb +6 -0
  290. data/lib/parsers/wallaby/parser.rb +32 -0
  291. data/lib/responders/wallaby/abstract_responder.rb +68 -0
  292. data/lib/responders/wallaby/resources_responder.rb +6 -0
  293. data/lib/servicers/wallaby/abstract_model_servicer.rb +48 -0
  294. data/lib/servicers/wallaby/model_servicer.rb +5 -0
  295. data/lib/services/wallaby/link_options_normalizer.rb +16 -0
  296. data/lib/services/wallaby/lookup_context_wrapper.rb +23 -30
  297. data/lib/services/wallaby/map/mode_mapper.rb +19 -0
  298. data/lib/services/wallaby/map/model_class_collector.rb +41 -0
  299. data/lib/services/wallaby/map/model_class_mapper.rb +24 -0
  300. data/lib/services/wallaby/map.rb +76 -39
  301. data/lib/services/wallaby/partial_renderer.rb +60 -0
  302. data/lib/services/wallaby/prefixes_builder.rb +54 -0
  303. data/lib/services/wallaby/sorting/hash_builder.rb +16 -0
  304. data/lib/services/wallaby/sorting/link_builder.rb +45 -0
  305. data/lib/services/wallaby/sorting/next_builder.rb +54 -0
  306. data/lib/services/wallaby/url_for.rb +36 -0
  307. data/lib/tree/wallaby/node.rb +17 -0
  308. data/lib/utils/wallaby/utils.rb +67 -22
  309. data/lib/wallaby/configuration/features.rb +12 -0
  310. data/lib/wallaby/configuration/metadata.rb +12 -0
  311. data/lib/wallaby/configuration/models.rb +27 -12
  312. data/lib/wallaby/configuration/pagination.rb +12 -0
  313. data/lib/wallaby/configuration/security.rb +55 -24
  314. data/lib/wallaby/configuration.rb +38 -19
  315. data/lib/wallaby/engine.rb +84 -39
  316. data/lib/wallaby/version.rb +1 -1
  317. data/lib/wallaby.rb +22 -3
  318. metadata +200 -55
  319. data/app/assets/javascripts/wallaby/form.js +0 -8
  320. data/app/assets/stylesheets/wallaby/base/_functions.scss +0 -0
  321. data/app/assets/stylesheets/wallaby/base/_normalize.scss +0 -0
  322. data/app/assets/stylesheets/wallaby/base/_reset.scss +0 -0
  323. data/app/assets/stylesheets/wallaby/components/_forms.scss +0 -53
  324. data/app/assets/stylesheets/wallaby/components/_nav.scss +0 -19
  325. data/app/assets/stylesheets/wallaby/components/_tables.scss +0 -78
  326. data/app/assets/stylesheets/wallaby/form.scss +0 -11
  327. data/app/controllers/wallaby/core_controller.rb +0 -28
  328. data/app/views/layouts/wallaby/_footer.html.erb +0 -2
  329. data/app/views/layouts/wallaby/_header.html.erb +0 -57
  330. data/app/views/layouts/wallaby/_navs.html.erb +0 -1
  331. data/app/views/wallaby/errors/access_denied.html.erb +0 -1
  332. data/app/views/wallaby/errors/not_authenticated.html.erb +0 -1
  333. data/app/views/wallaby/errors/not_found.html.erb +0 -6
  334. data/app/views/wallaby/errors/unprocessable_entity.erb +0 -1
  335. data/config/locales/en.yml +0 -29
  336. data/lib/adaptors/wallaby/active_record/model_operator/normalizer.rb +0 -44
  337. data/lib/adaptors/wallaby/active_record/model_operator/permitter.rb +0 -50
  338. data/lib/adaptors/wallaby/active_record/model_operator/querier.rb +0 -47
  339. data/lib/adaptors/wallaby/active_record/model_operator/validator.rb +0 -16
  340. data/lib/adaptors/wallaby/active_record/model_operator.rb +0 -82
  341. data/lib/errors/wallaby/deprecated.rb +0 -4
  342. data/lib/errors/wallaby/operation_not_found.rb +0 -4
  343. data/lib/handlers/wallaby/cached_compiled_erb.rb +0 -14
  344. data/lib/helpers/wallaby/core_helper.rb +0 -50
  345. data/lib/helpers/wallaby/paginatable_helper.rb +0 -9
  346. data/lib/helpers/wallaby/sorting_helper.rb +0 -43
  347. data/lib/interfaces/wallaby/model_operator.rb +0 -31
  348. data/lib/services/wallaby/decorator_finder.rb +0 -16
  349. data/lib/services/wallaby/model_servicer.rb +0 -38
  350. data/lib/services/wallaby/servicer_finder.rb +0 -5
@@ -2,65 +2,53 @@
2
2
  # decorate first on every page or partial
3
3
  decorated_collection = decorate collection
4
4
  %>
5
- <section>
6
- <% # Search form %>
7
- <div class="search-form <%= params[:sort].present? && 'sort' || '' %>">
8
- <div class="right">
9
- <%= index_link(current_model_class, class: 'btn btn-default') { ct 'link.clear_sort' } if params[:sort].present? %>
10
- <%= render 'index_actions' %>
11
- </div>
12
- <%= form_tag wallaby_engine.resources_path, method: :get do %>
13
- <%= text_field_tag :q, request.query_parameters[:q], placeholder: "Press enter to search. Example: 'text_keyword1 text_keyword2 field_name:value'" %>
14
- <% end %>
5
+ <article class="resources">
6
+ <div class="resources__header">
7
+ <h1><%= to_model_label(current_model_class) %></h1>
8
+ <%= render 'index_query' %>
9
+ <%= render 'index_filters' %>
10
+ <%= render 'index_pagination' %>
15
11
  </div>
16
- <% # /Search form %>
17
- <%= render 'wallaby/shared/flash_messages' %>
18
- <% # Data table %>
19
- <table class="data-table">
20
- <thead>
21
- <tr>
22
- <% current_model_decorator.index_field_names.each do |field_name| %>
23
- <th class="<%= sort_class field_name %>">
24
- <%= sort_link field_name %>
25
- </th>
26
- <% end %>
27
- <th>Actions</th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- <% if decorated_collection.present? %>
32
- <% decorated_collection.each do |decorated| %>
33
- <tr>
34
- <% current_model_decorator.index_field_names.each do |field_name| %>
35
- <td>
36
- <%= index_type_partial_render decorated.index_type_of(field_name), object: decorated, field_name: field_name %>
37
- </td>
12
+ <%= render 'flash_messages' %>
13
+
14
+ <section>
15
+ <% # Data table %>
16
+ <% if decorated_collection.present? %>
17
+ <% field_names = current_model_decorator.index_field_names %>
18
+ <div class="resources__container">
19
+ <table class="resources__data">
20
+ <thead>
21
+ <tr>
22
+ <% field_names.each do |field_name| %>
23
+ <%= content_tag :th, class: sort_link_builder.current_sort[field_name] do %>
24
+ <%= sort_link_builder.build field_name %>
25
+ <% end %>
26
+ <% end %>
27
+ <th>&nbsp;</th>
28
+ </tr>
29
+ </thead>
30
+ <tbody>
31
+ <% decorated_collection.each do |decorated| %>
32
+ <tr>
33
+ <% field_names.each do |field_name| %>
34
+ <td>
35
+ <%= type_partial_render decorated.index_type_of(field_name), object: decorated, field_name: field_name %>
36
+ </td>
37
+ <% end %>
38
+ <td class="resource__actions">
39
+ <%= render 'resource_actions', decorated: decorated %>
40
+ </td>
41
+ </tr>
38
42
  <% end %>
39
- <td>
40
- <%= render 'resource_actions', decorated: decorated %>
41
- </td>
42
- </tr>
43
- <% end %>
44
- <% else %>
45
- <tr>
46
- <td colspan="<%= current_model_decorator.index_field_names.length + 1 %>">
47
- <%= t 'collection.not_found' %>
48
- </td>
49
- </tr>
50
- <% end %>
51
- </tbody>
52
- </table>
53
- <% # /Data table %>
54
- <% # Kaminari pagination %>
55
- <% if paginatable? collection %>
56
- <div class="kaminari clearfix">
57
- <div class="pull-left pagination-info">
58
- <%= page_entries_info collection rescue custom_pagination_stats collection %>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+ <% else %>
47
+ <div class="resources__not-found">
48
+ <%= image_tag 'wallaby/404.png' %>
49
+ <%= t 'errors.not_found.collection' %>
59
50
  </div>
60
- <% _with_routes wallaby_engine do %>
61
- <%= paginate collection rescue nil %>
62
- <% end %>
63
- </div>
64
- <% end %>
65
- <% # /Kaminari pagination %>
66
- </section>
51
+ <% end %>
52
+ <% # /Data table %>
53
+ </section>
54
+ </article>
@@ -0,0 +1,5 @@
1
+ # custom json to serve the frontend javascript auto_select
2
+ json.array! decorate(collection) do |decorated|
3
+ json.id decorated.primary_key_value
4
+ json.label decorated.to_label
5
+ end
@@ -1,14 +1,15 @@
1
1
  <% decorated = decorate resource %>
2
- <section>
3
- <%= render 'wallaby/resources/shared/resource_nav' %>
4
- <div class="page-header">
2
+ <article class="resource">
3
+ <div class="resource__header">
5
4
  <h1>Create a <%= to_model_label current_resources_name %></h1>
5
+ <%= render 'resource_navs' %>
6
6
  </div>
7
- <%= render 'wallaby/shared/flash_messages' %>
8
- <%= form_for decorated, url: wallaby_engine.resources_path, method: :post, html: { :multipart => true }, builder: Wallaby::FormBuilder do |form| %>
9
- <%= render 'form', form: form, decorated: decorated %>
10
- <% end %>
11
- </section>
12
-
13
- <% content_for :custom_stylesheet, stylesheet_link_tag('wallaby/form', media: 'all', 'data-turbolinks-track' => true) %>
14
- <% content_for :custom_javascript, javascript_include_tag('wallaby/form', 'data-turbolinks-track' => true) %>
7
+ <%= render 'flash_messages' %>
8
+ <section>
9
+ <div class="resource__container">
10
+ <%= form_for decorated, url: wallaby_engine.resources_path, method: :post, html: { :multipart => true }, builder: Wallaby::FormBuilder do |form| %>
11
+ <%= render 'form', form: form, decorated: decorated %>
12
+ <% end %>
13
+ </div>
14
+ </section>
15
+ </article>
@@ -1,5 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.present? %>
2
- <%= show_link value %>
6
+ <%= show_link value, options: { readonly: true } %>
3
7
  <% elsif !metadata[:is_polymorphic] %>
4
8
  <%= new_link metadata[:class] %>
5
9
  <% else %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>
@@ -1 +1,5 @@
1
- <%= value ? na : null %>
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value ? muted('binary') : null %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value ? muted('blob') : null %>
@@ -1,5 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
4
- <%= value ? icon('check') : icon('unchecked') %>
8
+ <%= value ? fa_icon('check-square') : fa_icon('square') %>
5
9
  <% end %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -1,6 +1,10 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
4
8
  <code><%= value %></code>
5
- <%= link_to icon('new-window'), "http://ip-api.com/##{ value }", target: :_blank, class: 'text-info' %>
9
+ <%= link_to fa_icon('external-link-square'), "http://ip-api.com/##{ value }", target: :_blank, class: 'text-info' %>
6
10
  <% end %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1,5 +1,10 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
4
- <%= content_tag :span, nil, style: "background-color: #{ value };", class: 'color-square' %><span class="text-uppercase"><%= value %></span>
8
+ <%= content_tag :span, nil, style: "background-color: #{ value };", class: 'color-square' %>
9
+ <span class="text-uppercase"><%= value %></span>
5
10
  <% end %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value.nil? ? null : mail_to(value) %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value.try(:to_f) || null %>
@@ -1,5 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% unique_collection = value.uniq %>
2
6
  <% if unique_collection.present? %>
3
- <%= raw unique_collection.map { |item| show_link item }.to_sentence %>
7
+ <%= raw unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence %>
4
8
  <% end %>
5
- <%= new_link metadata[:class], prepend: unique_collection.present? && 'or' %>
9
+ <%= new_link metadata[:class] %>
@@ -1,5 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% unique_collection = value.uniq %>
2
6
  <% if unique_collection.present? %>
3
- <%= raw unique_collection.map { |item| show_link item }.to_sentence %>
7
+ <%= raw unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence %>
4
8
  <% end %>
5
- <%= new_link metadata[:class], prepend: unique_collection.present? && 'or' %>
9
+ <%= new_link metadata[:class] %>
@@ -1 +1,5 @@
1
- <%= value.present? ? show_link(value) : new_link(metadata[:class]) %>
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value.present? ? show_link(value, options: { readonly: true }) : new_link(metadata[:class]) %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <%= image_tag value, (metadata[:options] || {}) %>
9
+ <% end %>
@@ -1,6 +1,10 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
4
8
  <code><%= value %></code>
5
- <%= link_to icon('new-window'), "http://ip-api.com/##{ value }", target: :_blank, class: 'text-info' %>
9
+ <%= link_to fa_icon('external-link-square'), "http://ip-api.com/##{ value }", target: :_blank, class: 'text-info' %>
6
10
  <% end %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value ? muted('longblob') : null %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value ? muted('mediumblob') : null %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code>********</code>
9
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <code><%= value %></code>
9
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <% if value.nil? %>
6
+ <%= null %>
7
+ <% else %>
8
+ <%= value.html_safe %>
9
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <%= value || null %>
@@ -1,3 +1,7 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
1
5
  <% if value.nil? %>
2
6
  <%= null %>
3
7
  <% else %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value ? muted('tinyblob') : null %>
@@ -0,0 +1,5 @@
1
+ <%# @param object [model] model instance %>
2
+ <%# @param field_name [String] name of the field %>
3
+ <%# @param value [Object] value of the field %>
4
+ <%# @param metadata [Hash] metadata of the field %>
5
+ <%= value || null %>