dynamic-fields-for 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/README.md +2 -2
  2. data/lib/dynamic-fields-for/feature.rb +99 -0
  3. data/lib/dynamic-fields-for/railtie.rb +1 -3
  4. data/lib/dynamic-fields-for/version.rb +1 -1
  5. data/lib/dynamic-fields-for.rb +1 -2
  6. data/spec/features/dynamic_fields_for_spec.rb +1 -1
  7. data/spec/rails_app/log/development.log +25 -0
  8. data/spec/rails_app/log/test.log +4419 -0
  9. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/--butKi3RflT6uMAm__0wcQ5atJuccWH7MkD1vyz1ZA.cache +1 -0
  10. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/-Ssj32iZJewfw6z_ABzbWYyPMzutdxrMFdr0n-C-KrI.cache +1 -0
  11. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/0274lCgK7QxUoXwPKMliOmlAgB7ycd0qMyz272dqpt4.cache +1 -0
  12. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/0bqRAlwPjFPANHl4AbCMsp6917QTgz2g4pLChJoH9LY.cache +0 -0
  13. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/559Vp6J77Ciqj1YwJdMdlIdqqV9pVECtwsAaH391YgU.cache +1 -0
  14. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/5m_e81SKlysQc_rrneZJQKTNOQILtx2PmrH5Q7FB3T0.cache +1 -0
  15. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/5vQ9XlyWjVgB4zDxBk21ZBWVDFFLbxlGGKoZk7o5g_4.cache +1 -0
  16. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7EbqtHbgkvvOwyR36WOTVPJ4DHOeWLDqIe84oxk4CnA.cache +1 -0
  17. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7XaBvRYqNCX6ke9Wuj8AQFkK55J4iv8cF_FHz-FRv2Q.cache +1 -0
  18. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/7c1YgpEZoIyZr6YvGKylQ2nTmA1Nvmxe_zNX1AZwKko.cache +0 -0
  19. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/80JSkxx-nd_cm7RmXZNUYaL15Vj9Y5LovZYxEYJneEw.cache +1 -0
  20. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/92qqXVmfskXXt3M5Ua1WiHSQRTxe3Hl4yHuGd2W0UjU.cache +1 -0
  21. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ADlyxsLbW6cRyRVhAP60SVGIrKQBf9v9D4rjdg_ruv4.cache +1 -0
  22. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/AE64K-ptmbzvtoGh4ZiguMv6K-3pYFgb9VRoqrs0zHY.cache +1 -0
  23. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/CcbxtnudFD6OFJhOte0Tc5sL2lThlVzM07dDJS4Hy04.cache +0 -0
  24. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/DUR43UAjWw2ond5gsQwFAFH5733Jl5oOgVii2LKlwyM.cache +1 -0
  25. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/EZg-SJirC1IceW_jVefSYIAh8j-mQXmOJLN2GbysIaA.cache +1 -0
  26. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/GB60TSQ1EHygic3El7Ow6CSA45IvFQJMpXO_-N_onOc.cache +1 -0
  27. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/HpZN5BfCtJHaKLQhEJU2dO5o8CHzYS_d43SMyKi5s6A.cache +7 -0
  28. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Jfs6hIsgRIfC7jD6stH_4LjCL2U88j6F7hwKXrgE7Tw.cache +1 -0
  29. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Jm5HdDdtyhMI8aKDsDOYtORyUgedXtL3bkSFavLcywM.cache +2 -0
  30. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/M0kWs-_m0uuccvvsokhU13fLnB5FNXdUFTLv39tWotU.cache +0 -0
  31. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/MMDPi2ApKtElm-nMq6xYvx3SKXcROxKCDjxfkjXg5X8.cache +1 -0
  32. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/MryovvJkxvW706WlQ_CGEEyvVB6H685Oa5lPBY4z1-w.cache +1 -0
  33. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Nk1MqfQsR0mvFUEL_aRfcLR_7_ZgOW4OErZko-_uY6M.cache +1 -0
  34. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/NsTjdV_N11MZITpMYP1qNT8BrCdBbnoj21Olqm0M_ow.cache +1 -0
  35. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/OBWLH3mDggteTN8trw5Xo0Am8PD9zAi_c7ZXkwihY-w.cache +1 -0
  36. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/OwkfCrF-Wl6TaKSGQMOBe1z2gE_c1RVFEDKpZclYBuw.cache +1 -0
  37. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/PPJeQMuYP-x9XTDiID-Jz45EpMIQIXl2NpsufetJ4ME.cache +0 -0
  38. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/QQE9hlsc2xm-7YeEdQdNoMCMGtv0ZhfAthgSHalQ2fI.cache +1 -0
  39. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/S520ACMVfFtSq712MypJ2TozYJNPBtA6o0Bql6sLjdU.cache +2 -0
  40. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/SiEBsFV9Jy9PNpSqtbYqoHClY2yvBGI8WGAuTlYcthQ.cache +1 -0
  41. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/SmogzRzvMStlDQeKFh-PUcuADLqTRk3IIIyGVmwpLBw.cache +0 -0
  42. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/SpbGBs6at2-EaEXW9t2y6rYxTjy5jjQguB7gNeR9JYc.cache +1 -0
  43. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/T9yUkgKwgTK5z8Xvrof8e_ocUUWNQUzity46ZQMWLX4.cache +2 -0
  44. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/TYpKMKCEhea0mgOYgIj0EeFQmQ1-cr4Wmze7SCRPAuE.cache +1 -0
  45. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/VOp0pIv_pTt1jyD5JQn5Ee721CyQFQTGdnz4ODw38i4.cache +0 -0
  46. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/WHpyl2A3C6rEdAy9CGyH2qlcZTEd6nVH5LkrE0xwE2A.cache +1 -0
  47. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/YY9YYZhmgilo-WeGL0WRXVPfmAmX1sWQDWmipFaSYaA.cache +1 -0
  48. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/_YQpRVP1wvBilfPo-ycklDVKwDtPK9kvMwSo2k0NGBw.cache +1 -0
  49. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/bPwWHGIgpqSAHjn_weMZJawVZB8HzLeWG7pJyjoo06c.cache +1 -0
  50. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/bSG1JwdAUyORVL-1r29wO6kRt4-GuUz4DcbcoNf1Z4k.cache +1 -0
  51. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/dHDY7NiOZ46mr5v5aCzfURB6Z_Jmz2kXcsWWxR1og-g.cache +1 -0
  52. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/dS2w5XRij_RgDj4sW4SE2eEZUzjykg8stGFCeQuAwRM.cache +1 -0
  53. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/eQl17OYPhax46zt4WvME5dr5B_eBQCA-XV1JkS_-4ic.cache +0 -0
  54. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fNzioNJkih5kT4gWPswQdgBxLBUlauTw0OB2y_E2-yU.cache +1 -0
  55. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ft8mbObFO164VcgpJ-8QTZDnck-dSf5LhDy3lU3Iv_g.cache +1 -0
  56. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/gCDz_bajhrCa0zYc-KduYD_rA32Q7q2xlBZorTTGAXs.cache +1 -0
  57. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/h0gS2ZCp26LFHj5y9ykM8aQxyHbral4GHyiOFcKv8QY.cache +1 -0
  58. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/kHbZzpLREhn1wkGl6ufNEJGvgnFdEKG-Ro4sdkHkhcs.cache +1 -0
  59. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mNaSemCtHWAaxRzK9XHPgmIgnEzEt8EprvfZQikeFcQ.cache +0 -0
  60. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/oJ9PmIWQ_YM7bTPjtK1kHfcvoizLNSxmz_wnuTO-G5s.cache +1 -0
  61. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/olqPYieougpN4ZmdZqZv9bM5eWviPYHz2I-b8FS4wqQ.cache +0 -0
  62. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/owf35jC7wPWsETbV3nCNDM1Pm-J2dohLaG4hAjs_21I.cache +1 -0
  63. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/oz-NG5ZrWXIa4ZCgMaHws69No97cawQI1NQEZhryDpQ.cache +1 -0
  64. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/qPjyW0sqKLF_koGEYacxrcwWU60QCfFEwfVXStO1K3I.cache +0 -0
  65. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/taz7SwcAluNCJzEiaH9GwA1NXDmNF2A8c0i2ncHWcpY.cache +1 -0
  66. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/uuNErK59ScfbDxjUTOUVomi6USTr_KA54Oa7_I-6To8.cache +1 -0
  67. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/v2tToJacn3OzQAX95K81nZRTS1n4oGGKbOTrez0ydmw.cache +2 -0
  68. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/vEfbP3aAlexgl_ArpgEqm7agv9s-CJbq42qxsDbtJRU.cache +2 -0
  69. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wDAcQxAlzNur4YRCHSXM32kS2RwnRio6B9xn2c7mexw.cache +1 -0
  70. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wmiwF4WagZB0bPVaKMbqA1GtCdfXHBUzW6WsYW7HVjc.cache +1 -0
  71. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/wsyRu1vXHMDu5y7pTLW8EK-zkzEWDT04mzolBGxIU4I.cache +1 -0
  72. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/xh6plnMOM10s5sYUI3f3p_jToDh2B3ZfdG_Bda-xnB0.cache +1 -0
  73. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/yJSdezTugZqb0N0rjJ3dTmD6z-zfN3ZxruPHaFzG9Uo.cache +2 -0
  74. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ySJMBl8_8f1TC2JeQF-Rnp4A9M84cYN97jeVikGSTus.cache +0 -0
  75. data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/yg8d_V4iUIxsgYwk7WupqlaSAbi3e9kP6OcvP1XBglA.cache +1 -0
  76. metadata +134 -8
  77. data/lib/dynamic-fields-for/form_helper.rb +0 -96
  78. data/spec/rails_app/tmp/pids/server.pid +0 -1
  79. data/spec/support/dynamic-fields-for.rb +0 -11
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  DynamicFieldsFor
2
2
  ================
3
3
  [![Version](https://badge.fury.io/rb/dynamic-fields-for.svg)](http://badge.fury.io/rb/dynamic-fields-for)
4
- [![Build](https://travis-ci.org/stokarenko/dynamic-fields-for.svg)](https://travis-ci.org/stokarenko/dynamic-fields-for)
4
+ [![Build](https://travis-ci.org/stokarenko/dynamic-fields-for.svg?branch=master)](https://travis-ci.org/stokarenko/dynamic-fields-for)
5
5
  [![Climate](https://codeclimate.com/github/stokarenko/dynamic-fields-for/badges/gpa.svg)](https://codeclimate.com/github/stokarenko/dynamic-fields-for)
6
6
  [![Coverage](https://codeclimate.com/github/stokarenko/dynamic-fields-for/badges/coverage.svg)](https://codeclimate.com/github/stokarenko/dynamic-fields-for/coverage)
7
7
 
@@ -23,7 +23,7 @@ The main features are:
23
23
  * Ruby >= 1.9.3
24
24
  * [rails](https://github.com/rails/rails) >= 3.2.13
25
25
  * [jquery-rails](https://github.com/rails/jquery-rails)
26
- * [association-soft-build](https://github.com/stokarenko/association-soft-build)
26
+ * [activerecord-devkit](https://github.com/stokarenko/activerecord-devkit), `association_soft_build` feature
27
27
 
28
28
  ## Getting started
29
29
 
@@ -0,0 +1,99 @@
1
+ RubyFeatures.define 'dynamic_fields_for' do
2
+
3
+ dependency 'activerecord_devkit/association_soft_build'
4
+
5
+ apply_to 'ActionView::Helpers::FormBuilder' do
6
+
7
+ applied do
8
+ alias_method_chain :fields_for, :dynamic_fields
9
+ alias_method_chain :fields_for_nested_model, :dynamic_fields
10
+ end
11
+
12
+ instance_methods do
13
+ def fields_for_with_dynamic_fields(association, record_object = nil, options = {}, &block)
14
+ #Inherit the native parameters adjustment
15
+ options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
16
+
17
+ return fields_for_without_dynamic_fields(association, record_object, options, &block) unless options.delete(:dynamic)
18
+
19
+ new_object = @object.association(association).soft_build
20
+
21
+ options[:child_index] = 'dynamic_fields_index'
22
+ remove_template = fields_for_without_dynamic_fields(association, new_object, options) do |f|
23
+ f.hidden_field(:id, value: 'dynamic_fields_object_id') +
24
+ f.hidden_field(:_destroy, value: true)
25
+ end
26
+
27
+ options[:dynamic_fields_id] = dynamic_fields_id(association)
28
+ add_template = fields_for_without_dynamic_fields(association, new_object, options, &block)
29
+
30
+ options.delete(:child_index)
31
+ collection_output = fields_for_without_dynamic_fields(association, record_object, options, &block)
32
+
33
+ cover_by_anchors(
34
+ {
35
+ begin: options[:dynamic_fields_id],
36
+ 'add-template' => CGI.escapeHTML(add_template),
37
+ 'remove-template' => CGI.escapeHTML(remove_template)
38
+ },
39
+ collection_output,
40
+ {end: options[:dynamic_fields_id]}
41
+ )
42
+ end
43
+
44
+ def add_fields_link(association, label, options = {})
45
+ @template.link_to(label, '#', dynamic_fields_data_options(add: dynamic_fields_id(association)).deep_merge(options))
46
+ end
47
+
48
+ def remove_fields_link(label, options = {})
49
+ anchor_options = {}.tap do |mem|
50
+ if @options.has_key?(:dynamic_fields_id)
51
+ mem[:remove] = @options[:dynamic_fields_id]
52
+ mem['remove-id'] = @object.id if @object.try(:persisted?)
53
+ end
54
+ end
55
+
56
+ @template.link_to(label, '#', dynamic_fields_data_options(anchor_options).deep_merge(options))
57
+ end
58
+
59
+ def fields_for_nested_model_with_dynamic_fields(name, object, fields_options, block)
60
+ cover_by_anchors_if(
61
+ fields_options.has_key?(:dynamic_fields_id),
62
+ {'item-begin' => fields_options[:dynamic_fields_id]},
63
+ fields_for_nested_model_without_dynamic_fields(name, object, fields_options, block)
64
+ )
65
+ end
66
+
67
+ private
68
+
69
+ def dynamic_fields_id(association)
70
+ "#{self.object_id}-#{association}"
71
+ end
72
+
73
+ def dynamic_fields_data_options(anchor_options)
74
+ return nil if anchor_options.nil?
75
+
76
+ anchor_options.inject({data: {}}) do |mem, (key, value)|
77
+ mem[:data][:"dynamic-fields-#{key}"] = value.html_safe? ? value : value.html_safe
78
+ mem
79
+ end
80
+ end
81
+
82
+ def cover_by_anchors(begin_anchor_options, content, end_anchor_options = nil)
83
+ anchor(begin_anchor_options) + content + anchor(end_anchor_options)
84
+ end
85
+
86
+ def cover_by_anchors_if(condition, begin_anchor_options, content, end_anchor_options = nil)
87
+ condition ?
88
+ cover_by_anchors(begin_anchor_options, content, end_anchor_options) :
89
+ content
90
+ end
91
+
92
+ def anchor(anchor_options)
93
+ return ''.html_safe if anchor_options.nil?
94
+
95
+ @template.content_tag(:script, nil, dynamic_fields_data_options(anchor_options))
96
+ end
97
+ end
98
+ end
99
+ end.apply
@@ -4,9 +4,7 @@ module DynamicFieldsFor
4
4
  class Engine < Rails::Engine
5
5
 
6
6
  initializer 'dynamic-fields-for.configure_rails_initialization' do
7
- ActiveSupport.on_load :action_view do
8
- ActionView::Helpers::FormBuilder.send :include, DynamicFieldsFor::FormHelper
9
- end
7
+ require 'dynamic-fields-for/feature'
10
8
  end
11
9
  end
12
10
  end
@@ -1,3 +1,3 @@
1
1
  module DynamicFieldsFor
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
@@ -1,9 +1,8 @@
1
1
  require 'dynamic-fields-for/version'
2
2
  require 'jquery-rails'
3
- require 'association-soft-build'
3
+ require 'activerecord-devkit'
4
4
 
5
5
  module DynamicFieldsFor
6
- autoload :FormHelper, 'dynamic-fields-for/form_helper'
7
6
  end
8
7
 
9
8
  require 'dynamic-fields-for/railtie'
@@ -1,4 +1,4 @@
1
- describe DynamicFieldsFor::FormHelper do
1
+ describe DynamicFieldsFor do
2
2
  describe '#fields_for' do
3
3
  def expect_result(user)
4
4
  expect(page).to have_button('Update User')
@@ -2478,3 +2478,28 @@ ActionView::Template::Error (undefined method `html_safe' for nil:NilClass):
2478
2478
  Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (0.7ms)
2479
2479
  Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.5ms)
2480
2480
  Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (6.8ms)
2481
+
2482
+
2483
+ Started GET "/users/953441985/edit_without_fields" for 127.0.0.1 at 2015-05-10 14:26:19 +0300
2484
+ Processing by UsersController#edit_without_fields as HTML
2485
+ Parameters: {"id"=>"953441985"}
2486
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 953441985]]
2487
+ Rendered users/edit_without_fields.html.haml within layouts/application (1.1ms)
2488
+ Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.1ms)
2489
+
2490
+ ActionView::Template::Error (undefined method `html_safe' for nil:NilClass):
2491
+ 1: = link_to 'Edit', edit_user_path(@resource)
2492
+ 2:
2493
+ 3: = form_for @resource do |f|
2494
+ 4: = f.remove_fields_link 'Remove without fields'
2495
+ 5: = f.add_fields_link :roles, 'Add without fields'
2496
+ 6: = f.submit 'Update without fields'
2497
+ app/views/users/edit_without_fields.html.haml:4:in `block in _app_views_users_edit_without_fields_html_haml___2220097102974969742_70283682653560'
2498
+ app/views/users/edit_without_fields.html.haml:3:in `_app_views_users_edit_without_fields_html_haml___2220097102974969742_70283682653560'
2499
+
2500
+
2501
+ Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (0.7ms)
2502
+ Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.5ms)
2503
+ Rendered /Users/st/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/actionpack-4.1.10/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (8.1ms)
2504
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2505
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"