Skip to content

Instantly share code, notes, and snippets.

@yock yock/widget.html.erb
Created Aug 31, 2015

Embed
What would you like to do?
<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
You can’t perform that action at this time.