# Using friendly IDs to translate the name in the route to the ID. project_name = params[:id].to_s if Project.where('name like ?', project_name).empty? @project = Project.new @project.name = project_name notify("info", "Project does not exist - Create one!") return render :action => 'new' else @project = Project.where('name like ?', project_name).first end