mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 17:28:50 +01:00
use new model to handle updating of recurring todos
This commit is contained in:
parent
00af159be7
commit
c2c67f1640
12 changed files with 166 additions and 104 deletions
|
|
@ -5,13 +5,12 @@ module RecurringTodos
|
|||
|
||||
def initialize(user, attributes)
|
||||
super(user, attributes)
|
||||
|
||||
@pattern = DailyRepeatPattern.new(user, @filterred_attributes)
|
||||
end
|
||||
|
||||
def filter_attributes(attributes)
|
||||
@filterred_attributes = filter_generic_attributes(attributes)
|
||||
%w{daily_selector daily_every_x_days}.each{|key| @filterred_attributes[key] = attributes[key] if attributes.key?(key)}
|
||||
@filterred_attributes
|
||||
def attributes_to_filter
|
||||
%w{daily_selector daily_every_x_days}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue