From b9d996f435180ba0ea8f5d8af63d1301ef9363c4 Mon Sep 17 00:00:00 2001 From: LeandroNunes Date: Sat, 20 Oct 2007 15:05:56 +0000 Subject: [PATCH] ActionItem19: making chit --- app/controllers/application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index eb7f9ab..aed72d0 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -38,7 +38,8 @@ class ApplicationController < ActionController::Base end def load_profile - @profile = Profile.find_by_identifier(params[:profile]) + @profile = Profile.find_by_identifier(params[:profile]) + @profile ||= Profile.find(:first) #This is not correct it was made to the system don't crash raise "The profile must be loaded %s" % params[:profile].to_s if @profile.nil? end -- libgit2 0.21.2