aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/date_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #26905 from bogdanvlviv/docsAndrew White2016-11-131-2/+2
|\ | | | | Add missing `+` around a some literals.
| * Add missing `+` around a some literals.bogdanvlviv2016-10-271-2/+2
| | | | | | | | | | | | Mainly around `nil` [ci skip]
* | Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
| |
* | Fix small typo in ActionView API documentation [ci skip]Erol Fornoles2016-10-251-1/+1
|/
* [ci skip] Fixed commas according to Oxford comma in rdoc and guidesAndrey Molchanov2016-09-171-1/+1
|
* Fix Remaining Case-In-Assignment Statement FormattingAlex Kitchens2016-09-061-8/+9
| | | | | | | | | Recently, the Rails team made an effort to keep the source code consistent, using Ruboco (bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case statements were missed. This changes the case statements' formatting and is consistent with changes in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-6/+7
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-3/+3
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-58/+58
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-38/+38
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-20/+20
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Merge pull request #25287 from marekkirejczyk/fix_25267Godfrey Chan2016-06-251-1/+1
|\ | | | | Make select_year work with include_position: true option, fix #25267
| * Make select_year work with include_position: true option, fix #25267Marek2016-06-051-1/+1
| |
* | Explicitly require `acts_like` in AVSean Griffin2016-06-131-0/+1
|/ | | | | | This method is used in `distance_of_time_in_words` Fixes #25357
* Fix example for css_class_attribute and fix indentationPrathamesh Sonpatki2016-04-201-6/+6
|
* [ci skip] Small grammar fixAbhishek Jain2016-04-201-1/+1
|
* Merge pull request #24225 from ↵Rafael Mendonça França2016-04-201-3/+19
|\ | | | | | | | | | | neumayr/date_select_helper_with_css_classes_accept_hash date_select helper with_css_classes option also accept a hash
| * date_select helper with_css_classes option also accept a hashneumayr2016-04-051-3/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | `date_select` helper `:with_css_classes` option now accepts a hash of strings for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend the select type with the given css class value. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %> ``` ```html <select id="user_birthday_3i" name="user[birthday(3i)]">…</select> <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select> <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select> ``` Optional, add global `html_options` to modify every select tag in the set. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" }, { class: "my-date optional" } %> ``` Supported DateHelper methods: `select_day`, `select_month`, `select_year`, `select_hour`, `select_minute`, `select_second`, `select_datetime`, `select_time`, `time_select`, `date_select` and `datetime_select`. `:with_css_classes` option was added to the `date_select` with #7975.
* Fix style issues with #16252Sean Griffin2015-10-291-8/+5
|
* making selected value to accept Hash like the default option. E.g. selected: ↵Lecky Lao2015-10-291-1/+9
| | | | | | | | {day: params[:day].to_i, month: params[:month].to_id} Adds in test test_date_select_with_selected_in_hash and change log fixes typo in CHANGELOG
* Add documentation for ActionView::Helpers::DateHelper :use_hidden option [ci ↵Vince Francesi2015-08-151-0/+1
| | | | skip]
* Cut string allocations in content_tag_stringschneems2015-07-291-6/+6
| | | | | | content_tag's first argument is will generate a string with an html tag so `:a` will generate: `<a></a>`. When this happens, the symbol is implicitly `to_s`-d so a new string is allocated. We can get around that by using a frozen string instead which This change buys us 74,236 bytes of memory and 1,855 fewer objects per request.
* [skip ci] Lookup can be a noun but it is not a verbJon Atack2015-07-171-1/+1
| | | | Various grammar corrections and wrap to 80 characters.
* A few documentation fixes [ci skip]Robin Dupret2015-06-231-6/+6
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-06-211-1/+1
|\ | | | | | | | | Conflicts: guides/source/configuring.md
| * [ci skip] Fix minutes to seconds in `select_second`yui-knk2015-06-091-1/+1
| | | | | | | | This is same type commit of https://github.com/rails/rails/pull/20463
* | Nitpick :nail_care: [ci skip]Zachary Scott2015-06-181-1/+2
| |
* | Add RDoc about scope option on distance_of_time_in_wordsMauro George2015-06-181-0/+20
| | | | | | | | [ci skip]
* | [ci skip] Fix hours to minutes in `select_minute`yui-knk2015-06-071-1/+1
|/
* Add missing options to `datetime_select` [ci skip]yachibit2015-01-251-0/+2
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Add space in :start_year description for date_selectRyan Bigg2014-11-191-1/+1
|
* Replace Enumerable#reverse.each with Enumerable#reverse_eachErik Michaels-Ober2014-10-131-1/+1
|
* Uppercase HTML in docs.Hendy Tanata2014-08-081-6/+6
| | | | [skip ci]
* Rename options param of #time_ago_in_words to match API changeMax Kramer2014-06-281-2/+2
| | | Rename `include_seconds_or_options` to `options` to match 6b9356a (which removed the deprecation introduced by #6077). This has no functional impact because the parameter is passed directly through, but makes it clearer that the parameter no longer supports a boolean as input.
* Fix date_select option overwriting html classesIzumi Wong-Horiuchi2014-03-241-1/+1
| | | | | with_css_classes: true option overwrites other html classes. Concatenate day month and year classes rather than overwriting.
* Enhance readability of ActionView DateHelper#distance_of_time_in_wordsKenny Meyer2014-03-091-4/+8
| | | | | | | Refactor numerical constants to module constants which give the numbers a contextual meaning. This commit aims to provide quicker understanding for part of the implementation of the DateHelper#distance_of_time_in_words method.
* implements new option :month_format_string for date select helpers [Closes ↵Xavier Noria2014-02-151-9/+24
| | | | #13618]
* provide correct example of `datetime_select` helper [ci skip]Kuldeep Aggarwal2014-01-041-1/+1
|
* No need to use fixed size font [ci skip]Rafael Mendonça França2014-01-031-2/+2
|
* Fix documentation for end_year option of date_helper [ci skip]Prathamesh Sonpatki2014-01-031-2/+6
| | | | | | | | | | - While editing an existing record, end_year is equal to current selected year plus 5 by default. - While editing an existing record, start_year is equal to current selected year value minus 5 by default. - Fixes #13552 Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com> Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
* provide correct information [ci skip]Kuldeep Aggarwal2014-01-021-2/+2
|
* Minor typo fixesAkira Matsuda2013-11-271-1/+1
|
* Line up the comments for aestheticsDavid Heinemeier Hansson2013-11-031-5/+5
|
* Fix wrong variable name used in the select_day method documentationJefferson Queiroz Venerando2013-10-101-2/+2
| | | The variable name created in the example is `my_date`, the methods were using `my_time` instead.
* Remove the deprecated include_seconds argument from distance_of_time_in_wordsCarlos Antonio da Silva2013-07-021-9/+1
| | | | Pass in an :include_seconds hash option to use this feature.
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+1083