|
|
@ -630,9 +630,7 @@ class Project < ActiveRecord::Base
|
|
|
|
# Returns a short description of the projects (first lines)
|
|
|
|
# Returns a short description of the projects (first lines)
|
|
|
|
def short_description(length = 255)
|
|
|
|
def short_description(length = 255)
|
|
|
|
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
|
|
|
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
|
|
|
# 不再使用短描述
|
|
|
|
description.gsub(/<\/?.*?>/,"").html_safe if description
|
|
|
|
# description.gsub(/<\/?.*?>/,"").html_safe if description
|
|
|
|
|
|
|
|
description
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def css_classes
|
|
|
|
def css_classes
|
|
|
|