app/models/flyboy/goal.rb in flyboy-1.0.1 vs app/models/flyboy/goal.rb in flyboy-1.0.2
- old
+ new
@@ -16,10 +16,12 @@
end
has_many :tasks, dependent: :destroy
validates :title, presence: true
- validates :status, inclusion: {in: Flyboy::Goal.aasm.states.map(&:to_s)}
+ validates :status, inclusion: {
+ in: proc { Flyboy::Goal.aasm.states.map(&:to_s) }
+ }
def no_undone_tasks?
tasks.where(done: false).count == 0
end