Topic: simplifying a view

Is there any way to simplify something like this so as not to need both the if and the end?

<% if admin? %>
<th>Admin Stuff</th>
<% end %>

Re: simplifying a view

Try this:

<%= "<th>Admin Stuff</th>" if admin? %>

Re: simplifying a view

Perfect! Thanks!

Re: simplifying a view

Or better yet <%= content_tag :th, 'Admin Stuff' if admin? %>