mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 09:24:22 +01:00
move as_text helpers to respective pattern
This commit is contained in:
parent
cbdbb792a5
commit
d8507bf8b7
6 changed files with 77 additions and 85 deletions
|
|
@ -20,6 +20,14 @@ module RecurringTodos
|
|||
get(:every_day) && get(:every_day)[n, 1] != ' '
|
||||
end
|
||||
|
||||
def recurrence_pattern
|
||||
if every_x_week > 1
|
||||
I18n.t("todos.recurrence.pattern.every_n", :n => every_x_week) + " " + I18n.t("common.weeks")
|
||||
else
|
||||
I18n.t('todos.recurrence.pattern.weekly')
|
||||
end
|
||||
end
|
||||
|
||||
def validate
|
||||
super
|
||||
validate_not_blank(every_x_week, "Every other nth week may not be empty for weekly recurrence setting")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue