Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2011-10-27 11:11:42 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2011-10-27 11:11:42 +0400
commit5e584ee6264962cc60d9074c33141a28b4100607 (patch)
treea9eec02955b388e685ead3c46f1e586e37173cae /app/helpers/snippets_helper.rb
parentde4e859928d22a44549ebb719bbfd669f630f1b1 (diff)
refactor lifetime_select helper
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r--app/helpers/snippets_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb
index cd7b03593c8..6a91d616722 100644
--- a/app/helpers/snippets_helper.rb
+++ b/app/helpers/snippets_helper.rb
@@ -1,10 +1,10 @@
module SnippetsHelper
- def snippet_lifetime_select_options
+ def 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]
+ ['1 day', "#{Date.current + 1.day}"],
+ ['1 week', "#{Date.current + 1.week}"],
+ ['1 month', "#{Date.current + 1.month}"]
]
options_for_select(options)
end