I am using jquery-datatables. I want that if the value is numeric its alignment should be right and if it is string then the alignment should be left. Is it possible with datatables or is there any method in it?
<% @tasks.each do |task| -%>
<tr>
<% col_order.each do |key| %>
<td>
<% value = task[key.column_name.split(" as ")[1]] || task[key.column_name.split(".")[1]] -%>
<% if key["drilldown_reportid"].present? %>
<%= link_to value, project_report_path(@current_project,key["drilldown_reportid"], :column=>"#{key.column_name}", :value=>"#{value}") %>
<% else %>
<%= value -%> </td>
<% end %>
<% end %>
</tr>
<% end -%>