standard hobo behaviour in hobo_show & friends is: 

  rescue_from ActiveRecord::RecordNotFound, :with => :not_found unless 
Rails.env.development? 

Option 1: 

  def show 
    begin 
      hobo_show 
    rescue ActiveRecord::RecordNotFound => e 
      flash[:error] = 'Package not found.' 
      redirect_to :action => :index 
    end 
  end 

Option 2:  (only works in production mode): 

  def not_found 
    flash[:error] = '#{model.name} not found.' 
    redirect_to :action => :index 
  end 

not_found can be defined in either packages_controller or 
application_controller.   That's why I used #{model_name}. 

Bryan 

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to