File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 11begin ; require 'rails' ; rescue LoadError ; end
22begin ; require 'rails-api' ; rescue LoadError ; end
3+
34if defined? ( Rails )
5+ module ApiPagination
6+ module Hooks
7+ def self . rails_parent_controller
8+ if Gem ::Version . new ( Rails . version ) >= Gem ::Version . new ( '5' ) || defined? ( ActionController ::API )
9+ ActionController ::API
10+ else
11+ ActionController ::Base
12+ end
13+ end
14+ end
15+ end
16+
417 require 'rails/pagination'
518
619 ActiveSupport . on_load ( :action_controller ) do
2740 WARNING
2841end
2942
30- module ApiPagination
31- module Hooks
32- def self . rails_parent_controller
33- if Gem ::Version . new ( Rails . version ) >= Gem ::Version . new ( '5' ) || defined? ( ActionController ::API )
34- ActionController ::API
35- else
36- ActionController ::Base
37- end
38- end
39- end
40- end
You can’t perform that action at this time.
0 commit comments