<%= get_count_text() %> <% unless params[:slow_count] %> <%= link_to_remote "Calculate", :update => 'count_text', :url => { :action => 'count_text', :slow_count => true, :state_id => @state_id}, :before => "Element.setStyle('inner_count_text', {backgroundColor : '#FFBBBB'})" %> This can take a very long time. <% end %>