修复时间乱的问题

This commit is contained in:
huang 2015-09-02 10:23:22 +08:00
parent 469293bc1f
commit 0e4019be2f
3 changed files with 12 additions and 11 deletions

View File

@ -115,7 +115,7 @@ class MemosController < ApplicationController
REPLIES_PER_PAGE = 20 unless const_defined?(:REPLIES_PER_PAGE)
def show
#更新贴吧帖子留言对应的memo_messages的viewed字段
# 更新贴吧帖子留言对应的memo_messages的viewed字段
query_memo_messages = @memo.memo_messages
pre_count = REPLIES_PER_PAGE

View File

@ -28,6 +28,7 @@ class PollController < ApplicationController
render_403
return
end
# 问卷消息状态更新
query_course_poll = @poll.course_messages
query_course_poll.each do |query|
if User.current.id == query.user_id

View File

@ -756,16 +756,16 @@ module ApplicationHelper
return ss
end
# def time_tag(time, *args)
# options = args.extract_options!
# text = distance_of_time_in_words(Time.now, time)
# if @project
# content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# # link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
# else
# content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# end
# end
def time_tag(time, *args)
options = args.extract_options!
text = distance_of_time_in_words(Time.now, time)
if @project
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
# link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
else
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
end
end
def syntax_highlight_lines(name, content)
lines = []