activerecord_sortable 0.0.1 → 0.0.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/lib/activerecord_sortable/association_reflection.rb +1 -1
  3. data/lib/activerecord_sortable/collection_proxy.rb +19 -0
  4. data/lib/activerecord_sortable/has_many_association.rb +0 -1
  5. data/lib/activerecord_sortable/through_reflection.rb +16 -0
  6. data/lib/activerecord_sortable/version.rb +1 -1
  7. data/lib/activerecord_sortable.rb +2 -1
  8. data/spec/dummy/README.rdoc +28 -0
  9. data/spec/dummy/Rakefile +6 -0
  10. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  11. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  12. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  13. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  14. data/spec/dummy/app/models/post.rb +7 -0
  15. data/spec/dummy/app/models/post_tag.rb +6 -0
  16. data/spec/dummy/app/models/tag.rb +6 -0
  17. data/spec/dummy/app/models/user.rb +7 -0
  18. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  19. data/spec/dummy/bin/bundle +3 -0
  20. data/spec/dummy/bin/rails +4 -0
  21. data/spec/dummy/bin/rake +4 -0
  22. data/spec/dummy/config/application.rb +23 -0
  23. data/spec/dummy/config/boot.rb +4 -0
  24. data/spec/dummy/config/database.yml +25 -0
  25. data/spec/dummy/config/environment.rb +5 -0
  26. data/spec/dummy/config/environments/development.rb +37 -0
  27. data/spec/dummy/config/environments/production.rb +78 -0
  28. data/spec/dummy/config/environments/test.rb +39 -0
  29. data/spec/dummy/config/initializers/assets.rb +8 -0
  30. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  31. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  32. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  33. data/spec/dummy/config/initializers/inflections.rb +16 -0
  34. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  35. data/spec/dummy/config/initializers/session_store.rb +3 -0
  36. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  37. data/spec/dummy/config/locales/en.yml +23 -0
  38. data/spec/dummy/config/routes.rb +56 -0
  39. data/spec/dummy/config/secrets.yml +22 -0
  40. data/spec/dummy/config.ru +4 -0
  41. data/spec/dummy/db/development.sqlite3 +0 -0
  42. data/spec/dummy/db/migrate/20141007145452_create_users.rb +10 -0
  43. data/spec/dummy/db/migrate/20141007150446_create_posts.rb +10 -0
  44. data/spec/dummy/db/migrate/20141007184100_add_position_to_posts.rb +13 -0
  45. data/spec/dummy/db/migrate/20141007184101_create_tags.rb +9 -0
  46. data/spec/dummy/db/migrate/20141007184102_create_post_tags.rb +10 -0
  47. data/spec/dummy/db/migrate/20141008135500_add_position_to_post_tags.rb +11 -0
  48. data/spec/dummy/db/schema.rb +51 -0
  49. data/spec/dummy/db/seeds.rb +7 -0
  50. data/spec/dummy/log/development.log +3386 -0
  51. data/spec/dummy/public/404.html +67 -0
  52. data/spec/dummy/public/422.html +67 -0
  53. data/spec/dummy/public/500.html +66 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/public/robots.txt +5 -0
  56. data/spec/models/association_reflection_spec.rb +57 -0
  57. data/spec/models/association_relation_spec.rb +89 -0
  58. data/spec/models/has_many_association_spec.rb +53 -0
  59. data/spec/spec_helper.rb +25 -0
  60. metadata +109 -4
  61. data/lib/activerecord_sortable/association_relation.rb +0 -17
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Association reflection' do
4
+
5
+ let(:post_reflection) do
6
+ User.reflections['posts']
7
+ end
8
+
9
+ let(:user_post_reflection) do
10
+ User.reflections['user_posts']
11
+ end
12
+
13
+ let(:sorted_post_reflection) do
14
+ User.reflections['sorted_posts']
15
+ end
16
+
17
+ describe '.sortable?' do
18
+
19
+ describe 'when was set' do
20
+
21
+ it 'should be sortable' do
22
+ expect(user_post_reflection.sortable?).to be
23
+ end
24
+
25
+ end
26
+
27
+ describe 'when was not set' do
28
+
29
+ it 'should not be sortable' do
30
+ expect(post_reflection.sortable?).not_to be
31
+ end
32
+
33
+ end
34
+
35
+ end
36
+
37
+ describe '.sortable_field' do
38
+
39
+ describe 'when was set' do
40
+
41
+ it 'should equals set value' do
42
+ expect(user_post_reflection.sortable_field).to eq(:user_position)
43
+ end
44
+
45
+ end
46
+
47
+ describe 'when was not set' do
48
+
49
+ it 'should equals default' do
50
+ expect(sorted_post_reflection.sortable_field).to eq(:position)
51
+ end
52
+
53
+ end
54
+
55
+ end
56
+
57
+ end
@@ -0,0 +1,89 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Association relation' do
4
+
5
+ describe '.to_a' do
6
+
7
+ describe 'when relation is one to many' do
8
+
9
+ let(:post1) do
10
+ Post.create :title => 'Post1'
11
+ end
12
+
13
+ let(:post2) do
14
+ Post.create :title => 'Post2'
15
+ end
16
+
17
+ let(:post3) do
18
+ Post.create :title => 'Post3'
19
+ end
20
+
21
+ let(:posts) do
22
+ [post2, post1, post3]
23
+ end
24
+
25
+ let(:user) do
26
+ User.create({ :sorted_posts => posts })
27
+ end
28
+
29
+ describe 'when order was not used' do
30
+
31
+ it 'should sort' do
32
+ expect(user.sorted_posts).to eq(posts)
33
+ end
34
+
35
+ end
36
+
37
+ describe 'when order was used' do
38
+
39
+ it 'should not sort' do
40
+ expect(user.sorted_posts.order(:title => :asc)).to eq([post1, post2, post3])
41
+ end
42
+
43
+ end
44
+
45
+ end
46
+
47
+ describe 'when relation is many to many' do
48
+
49
+ let(:tag1) do
50
+ Tag.create :name => 'Tag1'
51
+ end
52
+
53
+ let(:tag2) do
54
+ Tag.create :name => 'Tag2'
55
+ end
56
+
57
+ let(:tag3) do
58
+ Tag.create :name => 'Tag3'
59
+ end
60
+
61
+ let(:tags) do
62
+ [tag2, tag1, tag3]
63
+ end
64
+
65
+ let(:post) do
66
+ Post.create({ :tags => tags })
67
+ end
68
+
69
+ describe 'when order was not used' do
70
+
71
+ it 'should sort' do
72
+ expect(post.tags).to eq(tags)
73
+ end
74
+
75
+ end
76
+
77
+ describe 'when order was used' do
78
+
79
+ it 'should not sort' do
80
+ expect(post.tags.order(:name => :asc)).to eq([tag1, tag2, tag3])
81
+ end
82
+
83
+ end
84
+
85
+ end
86
+
87
+ end
88
+
89
+ end
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Has many association' do
4
+
5
+ describe '.writer' do
6
+
7
+ describe 'when relation is one to many' do
8
+
9
+ let(:user) do
10
+ User.create
11
+ end
12
+
13
+ let(:post1) do
14
+ Post.create :title => 'Post1'
15
+ end
16
+
17
+ let(:post2) do
18
+ Post.create :title => 'Post2'
19
+ end
20
+
21
+ it 'should save position' do
22
+ user.sorted_posts = [post2, post1]
23
+ user.save
24
+ expect(post2.position).to eq(1)
25
+ end
26
+
27
+ end
28
+
29
+ describe 'when relation is many to many' do
30
+
31
+ let(:post) do
32
+ Post.create
33
+ end
34
+
35
+ let(:tag1) do
36
+ Tag.create :name => 'Tag1'
37
+ end
38
+
39
+ let(:tag2) do
40
+ Tag.create :name => 'Tag2'
41
+ end
42
+
43
+ it 'should save position' do
44
+ post.tags = [tag2, tag1]
45
+ post.save
46
+ expect(PostTag.find_by(:post => post, :tag => tag2).position).to eq(1)
47
+ end
48
+
49
+ end
50
+
51
+ end
52
+
53
+ end
@@ -0,0 +1,25 @@
1
+ require File.expand_path('../../spec/dummy/config/environment', __FILE__)
2
+
3
+ require 'rspec/rails'
4
+ require 'database_cleaner'
5
+ require 'jazz_hands'
6
+
7
+ RSpec.configure do |config|
8
+
9
+ config.order = 'random'
10
+ config.formatter = :documentation
11
+
12
+ config.before :suite do
13
+ DatabaseCleaner.strategy = :truncation
14
+ DatabaseCleaner.orm = 'active_record'
15
+ end
16
+
17
+ config.before :each do
18
+ DatabaseCleaner.start
19
+ end
20
+
21
+ config.after :each do
22
+ DatabaseCleaner.clean
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_sortable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Melanitskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-04 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -34,9 +34,62 @@ files:
34
34
  - lib/activerecord_sortable.rb
35
35
  - lib/activerecord_sortable/association.rb
36
36
  - lib/activerecord_sortable/association_reflection.rb
37
- - lib/activerecord_sortable/association_relation.rb
37
+ - lib/activerecord_sortable/collection_proxy.rb
38
38
  - lib/activerecord_sortable/has_many_association.rb
39
+ - lib/activerecord_sortable/through_reflection.rb
39
40
  - lib/activerecord_sortable/version.rb
41
+ - spec/dummy/README.rdoc
42
+ - spec/dummy/Rakefile
43
+ - spec/dummy/app/assets/javascripts/application.js
44
+ - spec/dummy/app/assets/stylesheets/application.css
45
+ - spec/dummy/app/controllers/application_controller.rb
46
+ - spec/dummy/app/helpers/application_helper.rb
47
+ - spec/dummy/app/models/post.rb
48
+ - spec/dummy/app/models/post_tag.rb
49
+ - spec/dummy/app/models/tag.rb
50
+ - spec/dummy/app/models/user.rb
51
+ - spec/dummy/app/views/layouts/application.html.erb
52
+ - spec/dummy/bin/bundle
53
+ - spec/dummy/bin/rails
54
+ - spec/dummy/bin/rake
55
+ - spec/dummy/config.ru
56
+ - spec/dummy/config/application.rb
57
+ - spec/dummy/config/boot.rb
58
+ - spec/dummy/config/database.yml
59
+ - spec/dummy/config/environment.rb
60
+ - spec/dummy/config/environments/development.rb
61
+ - spec/dummy/config/environments/production.rb
62
+ - spec/dummy/config/environments/test.rb
63
+ - spec/dummy/config/initializers/assets.rb
64
+ - spec/dummy/config/initializers/backtrace_silencers.rb
65
+ - spec/dummy/config/initializers/cookies_serializer.rb
66
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
67
+ - spec/dummy/config/initializers/inflections.rb
68
+ - spec/dummy/config/initializers/mime_types.rb
69
+ - spec/dummy/config/initializers/session_store.rb
70
+ - spec/dummy/config/initializers/wrap_parameters.rb
71
+ - spec/dummy/config/locales/en.yml
72
+ - spec/dummy/config/routes.rb
73
+ - spec/dummy/config/secrets.yml
74
+ - spec/dummy/db/development.sqlite3
75
+ - spec/dummy/db/migrate/20141007145452_create_users.rb
76
+ - spec/dummy/db/migrate/20141007150446_create_posts.rb
77
+ - spec/dummy/db/migrate/20141007184100_add_position_to_posts.rb
78
+ - spec/dummy/db/migrate/20141007184101_create_tags.rb
79
+ - spec/dummy/db/migrate/20141007184102_create_post_tags.rb
80
+ - spec/dummy/db/migrate/20141008135500_add_position_to_post_tags.rb
81
+ - spec/dummy/db/schema.rb
82
+ - spec/dummy/db/seeds.rb
83
+ - spec/dummy/log/development.log
84
+ - spec/dummy/public/404.html
85
+ - spec/dummy/public/422.html
86
+ - spec/dummy/public/500.html
87
+ - spec/dummy/public/favicon.ico
88
+ - spec/dummy/public/robots.txt
89
+ - spec/models/association_reflection_spec.rb
90
+ - spec/models/association_relation_spec.rb
91
+ - spec/models/has_many_association_spec.rb
92
+ - spec/spec_helper.rb
40
93
  homepage: https://github.com/Rademade/activerecord_sortable
41
94
  licenses:
42
95
  - MIT
@@ -61,4 +114,56 @@ rubygems_version: 2.2.2
61
114
  signing_key:
62
115
  specification_version: 4
63
116
  summary: Extension for active record.
64
- test_files: []
117
+ test_files:
118
+ - spec/models/has_many_association_spec.rb
119
+ - spec/models/association_reflection_spec.rb
120
+ - spec/models/association_relation_spec.rb
121
+ - spec/spec_helper.rb
122
+ - spec/dummy/README.rdoc
123
+ - spec/dummy/app/models/post.rb
124
+ - spec/dummy/app/models/user.rb
125
+ - spec/dummy/app/models/tag.rb
126
+ - spec/dummy/app/models/post_tag.rb
127
+ - spec/dummy/app/controllers/application_controller.rb
128
+ - spec/dummy/app/views/layouts/application.html.erb
129
+ - spec/dummy/app/helpers/application_helper.rb
130
+ - spec/dummy/app/assets/javascripts/application.js
131
+ - spec/dummy/app/assets/stylesheets/application.css
132
+ - spec/dummy/Rakefile
133
+ - spec/dummy/bin/rails
134
+ - spec/dummy/bin/bundle
135
+ - spec/dummy/bin/rake
136
+ - spec/dummy/config/environments/development.rb
137
+ - spec/dummy/config/environments/test.rb
138
+ - spec/dummy/config/environments/production.rb
139
+ - spec/dummy/config/initializers/session_store.rb
140
+ - spec/dummy/config/initializers/cookies_serializer.rb
141
+ - spec/dummy/config/initializers/assets.rb
142
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
143
+ - spec/dummy/config/initializers/wrap_parameters.rb
144
+ - spec/dummy/config/initializers/backtrace_silencers.rb
145
+ - spec/dummy/config/initializers/mime_types.rb
146
+ - spec/dummy/config/initializers/inflections.rb
147
+ - spec/dummy/config/locales/en.yml
148
+ - spec/dummy/config/database.yml
149
+ - spec/dummy/config/environment.rb
150
+ - spec/dummy/config/application.rb
151
+ - spec/dummy/config/routes.rb
152
+ - spec/dummy/config/secrets.yml
153
+ - spec/dummy/config/boot.rb
154
+ - spec/dummy/config.ru
155
+ - spec/dummy/public/422.html
156
+ - spec/dummy/public/500.html
157
+ - spec/dummy/public/favicon.ico
158
+ - spec/dummy/public/404.html
159
+ - spec/dummy/public/robots.txt
160
+ - spec/dummy/db/development.sqlite3
161
+ - spec/dummy/db/seeds.rb
162
+ - spec/dummy/db/migrate/20141008135500_add_position_to_post_tags.rb
163
+ - spec/dummy/db/migrate/20141007184102_create_post_tags.rb
164
+ - spec/dummy/db/migrate/20141007150446_create_posts.rb
165
+ - spec/dummy/db/migrate/20141007184100_add_position_to_posts.rb
166
+ - spec/dummy/db/migrate/20141007145452_create_users.rb
167
+ - spec/dummy/db/migrate/20141007184101_create_tags.rb
168
+ - spec/dummy/db/schema.rb
169
+ - spec/dummy/log/development.log
@@ -1,17 +0,0 @@
1
- # encoding: utf-8
2
- module ActiveRecord
3
- class AssociationRelation
4
-
5
- alias_method :original_to_a, :to_a
6
-
7
- def to_a
8
- if proxy_association.reflection.sortable? and order_values.empty?
9
- sortable_table_name = (proxy_association.try(:through_reflection) || proxy_association.reflection).table_name
10
- order("#{sortable_table_name}.#{proxy_association.reflection.sortable_field} ASC").to_a
11
- else
12
- original_to_a
13
- end
14
- end
15
-
16
- end
17
- end