I have an app with user and events. Each user has several events. When a user wants to see a specific event he will get to this action:
def show begin @use
Put return after redirect
begin @userEvents = current_user.event @event = @userEvents.find(params[:id]) rescue ActiveRecord::RecordNotFound redirect_to :controller => "main", :action => "index" return end