<% if Event.where(:id => @event_revision.current_revision).count > 0 %> <%= link_to "< Current Version", event_path(@event_revision.current_revision), :class => 'fake_button' %> <% else %> <%= link_to "< Browse Revisions", event_revisions_path, :class => 'fake_button' %> <% end %>