aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/date_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* correct handling of date selects when using both disabled and discard optionsVasiliy Ermolovich2012-08-251-0/+24
| | | | | | | | | | | | we should take disabled option not only from `html_options` hash but from `options` hash too like `build_select` method does it. So datetime_select("post", "updated_at", { :discard_minute => true }, { :disabled => true }) datetime_select("post", "updated_at", :discard_minute => true , :disabled => true) both these variants work now closes #7431
* Add support for start_hour and end_hour options in select_hour helperEvan Tann2012-08-131-0/+29
| | | | Updated documentation to demonstrate start_hour and end_hour options
* distance_of_time_in_words: Add/tweak comments to understand time intervals ↵Elliot Winkler2012-04-301-11/+20
| | | | better
* distance_of_time_in_words: 45-60 days is about 2 months, not about 1 monthElliot Winkler2012-04-301-1/+3
|
* Merge pull request #3726 from JanDupal/fix-date-helper-hiddenJosé Valim2012-04-301-0/+32
|\ | | | | fix Helpers::DateHelper with :use_hidden - hide separators
| * fix Helpers::DateHelper with :use_hidden - hide separatorsJan Dupal2011-11-221-0/+32
| |
* | Replace boolean argument with an options hash.Dmitriy Kiriyenko2012-04-301-19/+38
| | | | | | | | | | | | | | | | This replaces `include_seconds` argument with an option key `include_seconds => true` in options hash. Also `time_ago_in_words` now passes options hash, including a `locale` key, which makes in compatible with `distance_of_time_in_words`.
* | Remove unused assignment in actionpack date helper testMark Rushakoff2012-04-291-1/+1
| |
* | Use leap years trick in distance_of_time_in_words only for distances between ↵Alexey Vakhov2012-04-241-0/+2
| | | | | | | | real date points
* | fixed non matching documentation behaviour with method semantics on ↵Marcelo Casiraghi2012-04-241-2/+19
| | | | | | | | distance_of_time_in_words
* | Distance of time in words should work correct if from time > to_timeAlexey Vakhov2012-04-241-0/+1
| |
* | datetime_select should work with -/+ infinity datesJoe Van Dyk2012-03-281-0/+12
| |
* | Fixes issue #5222: DateTimeSelector builds invalid dates on leap day when ↵Jey Balachandran2012-03-181-5/+19
| | | | | | | | discarding both day and month.
* | time_tag support for blocksAntonio Tapiador del Dujo2012-03-181-0/+4
| |
* | Remove unused variables to avoid warningsRafael Mendonça França2012-01-241-3/+0
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* | Merge pull request #4641 from rafaelfranca/date_select-fix-3-2José Valim2012-01-241-1/+38
| | | | | | | | date_select fixes [3-2-stable]
* | Revert "Merge pull request #4154 from nashby/include-blank-date-helper"Piotr Sarnacki2011-12-261-20/+0
| | | | | | | | | | This reverts commit 76f0fa6066b78cd8f0e139dff4a7b65c96db5778, reversing changes made to 28cd098d99c52486aecb72aab39105d8abcd52ad.
* | add ability to set a prompt string in include_blank option for date helpers, ↵Vasiliy Ermolovich2011-12-241-0/+20
| | | | | | | | closes #4143
* | fix separator insertion in date_select helperSergey Nartimov2011-12-141-0/+19
| |
* | Added :use_two_digit_numbers option [Lennart Fridén & Kim Persson]Lennart Fridén2011-12-111-1/+18
|/ | | | | | | | | | Added use_two_digit_numbers select_tag option for displaying months and days with leading zeros without affecting the values (useful for e.g. ISO-style dates, 2011-08-01). Signed-off-by: José Valim <jose.valim@gmail.com> Conflicts: actionpack/CHANGELOG.md
* Fixes an issue when creating a date select with too many options.Liborio Cannici2011-10-081-0/+9
| | | | | | | | | | Inspired by dlt https://github.com/dlt/rails/commit/9e615634745dc81598e7b880d52411338d3a7a93 Closes #239. Conflicts: actionpack/CHANGELOG
* Merge pull request #343 from asanghi/ampmJosé Valim2011-05-071-0/+55
|\ | | | | Allow AM/PM format in datetime selectors
| * Allow AM/PM in datetime selectorsAditya Sanghi2011-04-291-0/+55
| |
* | Take leap years into account more seriously when calculating year distance ↵Aditya Sanghi2011-05-061-0/+4
|/ | | | [#6074 state:resolved]
* Fixing distance_of_time_in_words range near 2 daysMatt Duncan2011-04-131-3/+3
|
* Remove 'warning: ambiguous first argument' when running ActionPack testsSebastian Martinez2011-03-291-2/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-5/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * updated Time, Date and DateTime current methods in AS to use Time.zone and ↵Josh Kalderimis2011-02-281-2/+2
| | | | | | | | | | | | not Time.zone_default. [#6410 state:committed]
| * Allow for the format of time_tag in AP to be changed via an option argument.Josh Kalderimis2011-02-121-5/+11
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * Added time_tag helper to AP for HTML5 time tag [#5919 state:resolved]Sjoerd Andringa2011-02-121-1/+21
|/ | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* patching to ensure separator is printed with order [#5816 state:resolved]Aditya Sanghi2010-11-111-0/+41
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove duplicated test.Emilio Tagua2010-09-281-20/+0
|
* These tests shouldn't depend on local time to pass or fail, we can use utc here.Emilio Tagua2010-09-241-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-14/+14
| | | | 's/[ \t]*$//' -i {} \;)
* Fixed date_select date_separator when discard_month and/or discard_day are ↵Thibaud Guillaume-Gentil2010-06-201-0/+27
| | | | | | true [#4856 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix form builder and form helpers inconsistencies [#4432 state:resolved]Neeraj Singh2010-04-291-21/+80
| | | | | | | | * datetime_select and select_datetime should be consistent as much as possible * date_select and select_date should be consistent as much as possible * time_select and select_time should be consistent as much as possible Signed-off-by: José Valim <jose.valim@gmail.com>
* Make form helpers work with <%= wycats2010-03-091-7/+7
|
* Adds disable option to date_helpers generated hidden fields when ↵Santiago Pastorino2010-03-051-0/+55
| | | | | | | | html_options specifies it. ht by Marc Schütz [#3807 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* add time_separator for minutes only if minutes aren't hiddenSantiago Pastorino2010-02-251-0/+41
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]David Heinemeier Hansson2010-01-081-0/+22
|
* Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 ↵John Trupiano2009-09-281-12/+27
| | | | | | | days return '2 days'. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3266 state:committed]
* Enhancing distance_of_time_in_words to prefix year output with over and ↵Jay Pignata2009-09-281-7/+8
| | | | | | | about depending upon how many months have elapsed Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3106 state:committed]
* Stops date select helpers from defaulting the selected date to today if ↵Sam Oliver2009-02-131-14/+14
| | | | | | | :prompt option has been used Signed-off-by: Michael Koziarski <michael@koziarski.com> [#561 state:resolved]
* Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.Jeremy Kemper2009-02-031-34/+32
|
* Fix date_select within fields_for with an index [#1666 state:resolved] ↵Josh2009-01-161-15/+80
| | | | | | [Josh, Frederick Cheung] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
* Added prompt options to date helpers [#561 state:resolved]Sam Oliver2008-12-211-0/+321
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix regression bug that made date_select and datetime_select raise a Null ↵Bernardo de Pádua2008-11-041-0/+40
| | | | | | Pointer Exception when a nil date/datetime was passed and only month and year were displayed [#1289 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Refactor DateHelper to use DateTimeSelector presenter patternClemens Kofler2008-08-071-50/+249
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Refactor DateHelper and improve test coverage [#665 state:resolved]Clemens Kofler2008-07-211-48/+96
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>