This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_entrouvert/lib/project_model_patch.rb

13 lines
334 B
Ruby

module ProjectModelPatch
def self.included(base)
base.class_eval do
# Returns a short description of the projects (first lines)
def short_description(length = 255)
description.lines.first.strip if description and description.lines.first
end
end
end
end
Project.send(:include, ProjectModelPatch)