Skip to content

Commit d1960d4

Browse files
committed
Remove useless accessor
1 parent 1831893 commit d1960d4

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

lib/ajax-datatables-rails/base.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ def initialize(view, options = {})
1515
load_orm_extension
1616
end
1717

18-
def config
19-
@config ||= AjaxDatatablesRails.config
20-
end
21-
2218
def datatable
2319
@datatable ||= Datatable::Datatable.new(self)
2420
end
@@ -119,7 +115,7 @@ def records_filtered_count
119115

120116
# Private helper methods
121117
def load_orm_extension
122-
case config.orm
118+
case AjaxDatatablesRails.config.orm
123119
when :active_record
124120
extend ORM::ActiveRecord
125121
when :mongoid
@@ -157,5 +153,6 @@ def view_columns_error_text
157153
or aliased_join_table.column_name notation.
158154
ERROR
159155
end
156+
160157
end
161158
end

lib/ajax-datatables-rails/datatable/column.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ def formated_value
6666

6767
private
6868

69-
def config
70-
@config ||= AjaxDatatablesRails.config
71-
end
72-
7369
def type_cast
74-
DB_ADAPTER_TYPE_CAST[config.db_adapter] || 'VARCHAR'
70+
DB_ADAPTER_TYPE_CAST[AjaxDatatablesRails.config.db_adapter] || 'VARCHAR'
7571
end
7672

7773
def casted_column

lib/ajax-datatables-rails/datatable/datatable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def get_param(param)
7676
options[param].to_unsafe_h.with_indifferent_access
7777
end
7878
end
79+
7980
end
8081
end
8182
end

0 commit comments

Comments
 (0)