Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
compare: c1a9ce6b3b
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
2  app/views/datagrid/_table.html.erb
View
@@ -10,7 +10,7 @@ Local variables:
</thead>
<tbody>
<% if grid.rows.empty? %>
- <tr><td class="noresults" colspan="100%"><%= I18n.t 'datagrid.no_results', :default => 'No results found.' %></td></tr>
+ <tr><td class="noresults" colspan="100%"><%= I18n.t 'datagrid.no_results', :default => '&mdash;&mdash;'.html_safe %></td></tr>
<% else %>
<%= datagrid_rows(grid, assets, options) %>
<% end %>
16 spec/datagrid/helper_spec.rb
View
@@ -26,6 +26,22 @@
) }
let(:grid) { SimpleReport.new }
+ context "when grid has no records" do
+ let(:grid) do
+ test_report do
+ scope { Entry.where("1 != 1") }
+ end
+ end
+
+ it "should show an empty table with dashes" do
+ datagrid_table = subject.datagrid_table(grid)
+
+ datagrid_table.should match_css_pattern(
+ "table.datagrid tr td.noresults" => 1
+ )
+ end
+ end
+
describe ".datagrid_table" do
it "should have grid class as html class on table" do
subject.datagrid_table(grid).should match_css_pattern(

No commit comments for this range

Something went wrong with that request. Please try again.