Skip to content

Commit 452b1e5

Browse files
author
Peter Hamilton
committed
made sDom option work better
1 parent 3f44739 commit 452b1e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails_datatables.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def datatable(columns, opts={})
1414
row_callback = opts[:row_callback] || nil
1515
jqueryui = opts.key?(:jqueryui) ? opts[:jqueryui].to_s : "false"
1616
paginate = opts[:paginate].present? ? opts[:pagintate].to_s : "true"
17-
sdom = opts[:sdom] || opts[:sdom].to_s
17+
sdom = opts[:sdom] || ""
1818

1919
append = opts[:append] || nil
2020

@@ -46,7 +46,7 @@ def datatable(columns, opts={})
4646
"bStateSave": #{persist_state},
4747
"bFilter": #{search},
4848
"bAutoWidth": #{auto_width},
49-
"sDom": #{sdom},
49+
"sDom": '#{sdom}',
5050
#{"'aaSorting': [#{sort_by}]," if sort_by}
5151
#{"'sAjaxSource': '#{ajax_source}'," if ajax_source}
5252
"aoColumns": [

0 commit comments

Comments
 (0)