mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 10:30:15 +01:00
refactor creating todos in todos_controller
This commit is contained in:
parent
5ed69fc1a2
commit
010d0e9ba0
4 changed files with 177 additions and 185 deletions
|
|
@ -144,6 +144,10 @@ class Todo < ActiveRecord::Base
|
|||
return !uncompleted_predecessors.all.empty?
|
||||
end
|
||||
|
||||
def should_be_blocked?
|
||||
return !( uncompleted_predecessors.empty? || state == 'project_hidden' )
|
||||
end
|
||||
|
||||
# Returns a string with description <context, project>
|
||||
def specification
|
||||
project_name = self.project.is_a?(NullProject) ? "(none)" : self.project.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue