remove useless code block

This commit is contained in:
yanxd 2013-11-07 14:38:37 +08:00
parent 9996386fe4
commit 239a1484ae
2 changed files with 3 additions and 5 deletions

View File

@ -491,7 +491,6 @@ class ProjectsController < ApplicationController
@trackers = Tracker.sorted.all
@project = Project.new
@project.safe_attributes = params[:project]
logger.error "=======================================================#{params[:project].class}"
##add by huang
@course=Course.new
@course.safe_attributes = params[:course]

View File

@ -64,12 +64,11 @@ module CoursesHelper
end
def findCourseTime project
#logger.error "=============================#{l(:date)[:formats][:long] } "
date_format = l(:zh_date)[:formats][:default]
@course = Course.find_by_extra(@project.identifier)
str = ""
begin
unless @course.nil?
@course = Course.find_by_extra(@project.identifier)
date_format = l(:zh_date)[:formats][:default]
if @course
str = DateTime.parse(@course.setup_time.to_s).strftime("#{date_format}").to_s unless @course.setup_time.blank?
str << '-' unless @course.setup_time.blank?
str << DateTime.parse(@course.endup_time.to_s).strftime("#{date_format}").to_s unless @course.endup_time.blank?