mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
fix failing tests and small refactorings
This commit is contained in:
parent
e8c3ba2e28
commit
4e29bf69f7
8 changed files with 53 additions and 376 deletions
|
|
@ -118,6 +118,9 @@ class Project < ActiveRecord::Base
|
|||
return self.todos.deferred_or_blocked.empty? && self.todos.not_deferred_or_blocked.empty?
|
||||
end
|
||||
|
||||
def shortened_name(length=40)
|
||||
name.truncate(length, :omission => "...").html_safe
|
||||
end
|
||||
|
||||
def name=(value)
|
||||
self[:name] = value.gsub(/\s{2,}/, " ").strip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue