implement snippets lifetime
This commit is contained in:
parent
117d1e90fd
commit
8e1e17763f
5 changed files with 50 additions and 29 deletions
|
@ -1,2 +1,11 @@
|
|||
module SnippetsHelper
|
||||
def snippet_lifetime_select_options
|
||||
options = [
|
||||
['forever', nil],
|
||||
['1 day', Date.strptime("#{Date.current.day}.#{Date.current.month}.#{Date.current.year}", "%d.%m.%Y") + 1.day],
|
||||
['1 week', Date.strptime("#{Date.current.day}.#{Date.current.month}.#{Date.current.year}", "%d.%m.%Y") + 1.week],
|
||||
['1 month', Date.strptime("#{Date.current.day}.#{Date.current.month}.#{Date.current.year}", "%d.%m.%Y") + 1.month]
|
||||
]
|
||||
options_for_select(options)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue