File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
generators/ajaxdatatable/templates Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def as_json(options = {})
2020 {
2121 sEcho : params [ :sEcho ] . to_i ,
2222 iTotalRecords : @model_name . count ,
23- iTotalDisplayRecords : get_raw_record_count ,
23+ iTotalDisplayRecords : filtered_record_count ,
2424 aaData : data
2525 }
2626 end
@@ -35,7 +35,7 @@ def get_raw_records
3535 raise MethodError , "The method `get_raw_records' is not defined."
3636 end
3737
38- def get_raw_record_count
38+ def filtered_record_count
3939 search_records ( get_raw_records ) . count
4040 end
4141
Original file line number Diff line number Diff line change @@ -25,5 +25,9 @@ def get_raw_records
2525 # insert query here
2626 end
2727
28+ def get_raw_record_count
29+ search_records ( get_raw_records ) . count
30+ end
31+
2832 # ==== Insert 'presenter'-like methods below if necessary
2933end
You can’t perform that action at this time.
0 commit comments