@@ -30,15 +30,30 @@ def initialize(params, options = {})
3030
3131 # User defined methods
3232 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
3440 end
3541
3642 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
3848 end
3949
4050 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
4257 end
4358
4459 # ORM defined methods
@@ -149,32 +164,5 @@ def draw_id
149164 params [ :draw ] . present? ? { draw : params [ :draw ] . to_i } : { }
150165 end
151166
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-
179167 end
180168end
0 commit comments