Skip to content

Commit

Permalink
Cleaned up some spacing issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmorales committed Dec 27, 2018
1 parent 5736674 commit 2b3735d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ end
### Overrides
To override the value of a cell regardless of its header pass a hash of procedures mapped to the overriden header.
```ruby
<%= RenderTable::Table.render do |table| %>
<%= RenderTable::Table.render do |table| %>
<% table.records = User.all
<% table.header = [:id, :not_a_real_method] %>
<% table.override = {
not_a_real_method: ->(_cell, _cell_index) { 'hello world' }
not_a_real_method: ->(_cell, _cell_index) { 'hello world' }
} %>
<% end %>
```
Expand All @@ -85,6 +85,7 @@ class User::NameOverride
record.name.upcase
end
end

RenderTable::Table.render do |table|
table.records = User.all
table.header = [:id, :name]
Expand Down

0 comments on commit 2b3735d

Please sign in to comment.