Easy Question:

I have multiple pages which I want to have available for Textile edits via the admin user. I have a User table which has a admin: boolean column. I am trying to allow those who are admin (boolean = TRUE) to see the edit feature.

In my views model, I have the following viewer code to let those who are logged in to see the edit feature:

<% if logged_in? %>

<a href='#' id='edit'>Edit This Page</a>

<%= in_place_editor_field age, 'body', {},
{:rows => 20, :cols => 80, :external_control => 'edit', :external_control_only => true,
:load_text_url => {:controller => 'viewer', :action => 'get_unformatted_text', :id => @page.id}
} %>

<% else %>

<%= @page.body %>

<% end %>

Now I simply want to change the If to only allow Users.admin access to the in_place_editor_field. Should be easy but I am having troubles.