undefined m_coumt问题修正

competition
z9hang 11 years ago
parent b96a08a200
commit d1d2dd0e4b

@ -864,7 +864,7 @@ FROM `users` where id = #{user.id}")
users = Attachment.find_by_sql("SELECT COUNT(*) as m_count FROM #{Attachment.table_name} WHERE author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}") users = Attachment.find_by_sql("SELECT COUNT(*) as m_count FROM #{Attachment.table_name} WHERE author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}")
result = 0 result = 0
if users.count > 0 if users.count > 0
result = users.first.m_coumt result = users.first.m_count
end end
result result
end end

Loading…
Cancel
Save