aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/date_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-3/+3
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 ↵John Trupiano2009-09-281-10/+19
| | | | | | | 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-4/+7
| | | | | | | about depending upon how many months have elapsed Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3106 state:committed]
* Merge docrailsPratik Naik2009-07-251-5/+5
|
* Merge docrailslifo2009-04-171-3/+3
|
* Merge docrailsPratik Naik2009-03-161-2/+2
|
* Stops date select helpers from defaulting the selected date to today if ↵Sam Oliver2009-02-131-1/+1
| | | | | | | :prompt option has been used Signed-off-by: Michael Koziarski <michael@koziarski.com> [#561 state:resolved]
* Fix date_select within fields_for with an index [#1666 state:resolved] ↵Josh2009-01-161-5/+5
| | | | | | [Josh, Frederick Cheung] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
* Use I18n for date/time select helpers prompt text [#561 state:resolved]Sam Oliver2008-12-221-6/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Added prompt options to date helpers [#561 state:resolved]Sam Oliver2008-12-211-0/+79
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2008-12-191-1/+1
|
* use :en as a default locale (in favor of :en-US)Sven Fuchs2008-11-181-1/+1
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Fix regression bug that made date_select and datetime_select raise a Null ↵Bernardo de Pádua2008-11-041-2/+2
| | | | | | 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>
* Merge with docrails. Also add a rake task to generate guides in your rails ↵Pratik Naik2008-10-211-6/+6
| | | | | | | | application : rake doc:guides The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
* Refactor DateHelper to use DateTimeSelector presenter patternClemens Kofler2008-08-071-198/+378
| | | | 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-156/+142
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Merge branch 'master' into i18n-mergeJeremy Kemper2008-07-171-2/+2
|\ | | | | | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/form_options_helper.rb activerecord/lib/active_record/validations.rb
| * Merge with docrails.Pratik Naik2008-07-161-2/+2
| |
* | merge forward to current rails/masterSven Fuchs2008-07-161-19/+31
|\|
| * Allow date helpers to ignore date hidden field tags. [#503 state:resolved]miloops2008-07-041-2/+5
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Remove unused local_binding option to InstanceTag's ConstructorMichael Koziarski2008-07-031-3/+3
| |
| * Remove nested ternary operators from select_year in favour of conditionals.Michael Koziarski2008-07-031-11/+20
| |
| * Ensure FormBuilder date helpers respects html_options. [#506 state:resolved] ↵Pratik Naik2008-06-291-3/+3
| | | | | | | | | | | | [Pascal Ehlert] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | align with changes in i18nSven Fuchs2008-07-061-3/+2
| |
* | remove core extensions in favor of I18n#translate and I18n#localizeSven Fuchs2008-07-021-2/+3
| |
* | remove call to self.locale from helpersSven Fuchs2008-06-231-4/+1
| |
* | check self.locale instead of request.locale in helpersSven Fuchs2008-06-221-2/+2
| |
* | integrating I18n into RailsSven Fuchs2008-06-191-33/+48
|/
* InstanceTag#default_time_from_options overflows to DateTimegbuesing2008-05-181-1/+1
|
* ActionView::InstanceTag#default_time_from_options with hash args uses ↵gbuesing2008-05-081-3/+4
| | | | Time.current as default; respects hash settings when time falls in system local spring DST gap
* Adding Date.current, which returns Time.zone.today if config.time_zone is ↵gbuesing2008-05-081-1/+1
| | | | set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
* Improve documentation coverage and markupXavier Noria2008-05-021-4/+4
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* select_datetime and select_time default to Time.zone.now when ↵gbuesing2008-04-211-2/+2
| | | | config.time_zone is set
* datetime_select defaults to Time.zone.now when config.time_zone is setgbuesing2008-04-211-1/+1
|
* Docfix (closes #11263) [Irfy]David Heinemeier Hansson2008-03-151-21/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow html_options to be passed to all the date helpers. Closes #6000 ↵Michael Koziarski2008-03-021-36/+49
| | | | | | [h-lame, Jakob S] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8968 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make date_helper use tag and content_tag. Move to assert_dom_equal instead ↵Michael Koziarski2008-02-201-18/+26
| | | | | | of assert_equal to avoid being dependent on hash ordering. Closes #11131 [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: date helperJeremy Kemper2007-12-211-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8467 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update documentation to reflect increased accuracy of date interval ↵Marcel Molina2007-12-051-4/+3
| | | | | | calculations. Closes #7192 [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typos (closes #10378)David Heinemeier Hansson2007-12-051-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document :minute_step option for time_select. Closes #8814 [brupm]Marcel Molina2007-11-061-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 1 years -> 1 yearJeremy Kemper2007-10-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Massive documentation update for all helpers (closes #8223, #8177, #8175, ↵David Heinemeier Hansson2007-06-231-24/+244
| | | | | | #8108, #7977, #7972, #7971, #7969) [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only change date to beginning of month if it isn't nil.Jeremy Kemper2007-06-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that DateHelper#date_select should set the day to the 1st when its a ↵David Heinemeier Hansson2007-05-311-1/+14
| | | | | | hidden option and the month is visible (or invalid dates can be produced) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* date_select and datetime_select take a :default option. Closes #7052.Jeremy Kemper2007-01-281-1/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #distance_of_time_in_words to report accurately against the Duration ↵Rick Olson2007-01-171-3/+3
| | | | | | class. #7114 [eventualbuddha] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix date helper :include_blank regression. Closes #3811. [mhw]Jeremy Kemper2006-12-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Bob's raining patches: fixes date_helper bugs and usability issues. ↵Jeremy Kemper2006-12-061-121/+213
| | | | | | References #3811. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de