1
0
Fork 0
mirror of https://github.com/varvet/pundit.git synced 2022-11-09 12:30:11 -05:00

Separate code blocks in ruby to avoid bad coloring

This commit is contained in:
Adrien 2014-10-28 13:52:32 +01:00
parent 9a827581b4
commit 0220b200cc

View file

@ -138,10 +138,14 @@ you can retrieve it by passing a symbol.
class DashboardPolicy < Struct.new(:user, :dashboard)
# ...
end
```
```ruby
# In controllers
authorize :dashboard, :show?
```
```erb
# In views
<% if policy(:dashboard).show? %>
<%= link_to 'Dashboard', dashboard_path %>