Skip to content

Commit 7373848

Browse files
committed
Instantiate Datatable object in AjaxDatatablesRails::Base.initialize
1 parent 79ba03c commit 7373848

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/ajax-datatables-rails/base.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
module AjaxDatatablesRails
44
class Base
55

6-
attr_reader :params, :options
6+
attr_reader :params, :options, :datatable
77

88
GLOBAL_SEARCH_DELIMITER = ' '
99

1010
def initialize(params, options = {})
1111
@params = params
1212
@options = options
1313
load_orm_extension
14-
end
15-
16-
def datatable
17-
@datatable ||= Datatable::Datatable.new(self)
14+
@datatable = Datatable::Datatable.new(self)
1815
end
1916

2017
def view_columns

0 commit comments

Comments
 (0)