Skip to content

Commit 4f49c99

Browse files
committed
Auto include the helpers
1 parent b352dae commit 4f49c99

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
sortable_by (1.0.1)
4+
sortable_by (1.0.2)
55
rails (>= 5.0)
66

77
GEM

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ In your controller, use the `sortable_by` method to configure sorting attributes
3535

3636
```ruby
3737
class MyController < ApplicationController
38-
include SortableBy::Params
39-
4038
# Configure the sortable attributes
4139
sortable_by :email, # A basic sort
4240
full_name: [:last_name, :first_name], # This will sort on two columns

lib/sortable_by/engine.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module SortableBy
22
class Engine < ::Rails::Engine
3+
initializer :controller do
4+
ActiveSupport.on_load(:action_controller) { include SortableBy::Params }
5+
end
36
end
47
end

lib/sortable_by/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SortableBy
2-
VERSION = '1.0.1'.freeze
2+
VERSION = '1.0.2'.freeze
33
end

0 commit comments

Comments
 (0)