@@ -30,15 +30,30 @@ def initialize(params, options = {})
30
30
31
31
# User defined methods
32
32
def view_columns
33
- raise ( NotImplementedError , view_columns_error_text )
33
+ raise ( NotImplementedError , <<~ERROR )
34
+
35
+ You should implement this method in your class and return an array
36
+ of database columns based on the columns displayed in the HTML view.
37
+ These columns should be represented in the ModelName.column_name,
38
+ or aliased_join_table.column_name notation.
39
+ ERROR
34
40
end
35
41
36
42
def get_raw_records
37
- raise ( NotImplementedError , raw_records_error_text )
43
+ raise ( NotImplementedError , <<~ERROR )
44
+
45
+ You should implement this method in your class and specify
46
+ how records are going to be retrieved from the database.
47
+ ERROR
38
48
end
39
49
40
50
def data
41
- raise ( NotImplementedError , data_error_text )
51
+ raise ( NotImplementedError , <<~ERROR )
52
+
53
+ You should implement this method in your class and return an array
54
+ of arrays, or an array of hashes, as defined in the jQuery.dataTables
55
+ plugin documentation.
56
+ ERROR
42
57
end
43
58
44
59
# ORM defined methods
@@ -149,32 +164,5 @@ def draw_id
149
164
params [ :draw ] . present? ? { draw : params [ :draw ] . to_i } : { }
150
165
end
151
166
152
- def raw_records_error_text
153
- <<~ERROR
154
-
155
- You should implement this method in your class and specify
156
- how records are going to be retrieved from the database.
157
- ERROR
158
- end
159
-
160
- def data_error_text
161
- <<~ERROR
162
-
163
- You should implement this method in your class and return an array
164
- of arrays, or an array of hashes, as defined in the jQuery.dataTables
165
- plugin documentation.
166
- ERROR
167
- end
168
-
169
- def view_columns_error_text
170
- <<~ERROR
171
-
172
- You should implement this method in your class and return an array
173
- of database columns based on the columns displayed in the HTML view.
174
- These columns should be represented in the ModelName.column_name,
175
- or aliased_join_table.column_name notation.
176
- ERROR
177
- end
178
-
179
167
end
180
168
end
0 commit comments