File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
lib/ajax-datatables-rails Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff 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
161158end
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
8182end
You can’t perform that action at this time.
0 commit comments