Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@yock
Created August 31, 2015 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yock/9a6176e6fc64515754c7 to your computer and use it in GitHub Desktop.
Save yock/9a6176e6fc64515754c7 to your computer and use it in GitHub Desktop.
<table>
<thead>
<th>Foo</th>
<% if feature_enabled?(:premium) %>
<th>Premium</th>
<% end %>
</thead>
<tbody>
<tr>
<td><%= @widget.foo %></td>
<% if feature_enabled?(:premium) %>
<td><%= @widget.premium %></td>
<% end %>
</tr>
</tbody>
</table>
class WidgetController
def show
add_feature(:premium)
@widget = Widget.find(widget_params)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment