diff --git a/app/controllers/application.rb b/app/controllers/application.rb index f639b57..cd69c9f 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -40,7 +40,7 @@ class ApplicationController < ActionController::Base def load_profile @profile ||= Profile.find_by_identifier(params[:profile]) # @profile ||= Profile.find(:first) - render_not_found(request.path) unless @profile + render_not_found(request.path) unless profile end def render_not_found(path) diff --git a/app/controllers/public/category_controller.rb b/app/controllers/public/category_controller.rb index 41e2ae8..1250e43 100644 --- a/app/controllers/public/category_controller.rb +++ b/app/controllers/public/category_controller.rb @@ -17,7 +17,7 @@ class CategoryController < ApplicationController path = params[:path].join('/') @category = environment.categories.find_by_path(path) if @category.nil? - render :text => ('No such category (%s).' % path), :status => 404 + render_not_found(path) end end -- libgit2 0.21.2