File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
lib/ajax-datatables-rails Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,8 @@ module AjaxDatatablesRails
4
4
class Base
5
5
6
6
class << self
7
- def rails_52?
8
- Rails . gem_version >= Gem ::Version . new ( '5.2' ) && Rails . gem_version <= Gem ::Version . new ( '6.0' )
9
- end
10
-
11
- def rails_60?
12
- Rails . gem_version >= Gem ::Version . new ( '6.0' ) && Rails . gem_version <= Gem ::Version . new ( '6.1' )
13
- end
14
-
15
7
def default_db_adapter
16
- if rails_52?
17
- ::ActiveRecord ::Base . configurations . dig ( Rails . env , 'adapter' ) . downcase . to_sym
18
- elsif rails_60?
19
- ::ActiveRecord ::Base . configurations . configs_for ( env_name : Rails . env ) . first . config [ 'adapter' ] . downcase . to_sym
20
- else
21
- ::ActiveRecord ::Base . configurations . configs_for ( env_name : Rails . env ) . first . adapter . downcase . to_sym
22
- end
8
+ ::ActiveRecord ::Base . configurations . configs_for ( env_name : Rails . env ) . first . adapter . downcase . to_sym
23
9
end
24
10
end
25
11
You can’t perform that action at this time.
0 commit comments