aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
Commit message (Collapse)AuthorAgeFilesLines
* do not freeze NumberHelper defaults.Yves Senn2013-03-181-2/+2
| | | | Closes #9767.
* Merge pull request #9616 from exviva/multiple_select_name_double_square_bracketsCarlos Antonio da Silva2013-03-091-1/+1
| | | | | | | | | | | | | | | | | | | Fix incorrectly appended square brackets to a multiple select box Before: select(:category, [], {}, {:multiple => true, :name => "post[category][]"}) # => <select name="post[category][][]" ...> After: select(:category, [], {}, {:multiple => true, :name => "post[category][]"}) # => <select name="post[category][]" ...> Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_view/helpers/tags/base.rb actionpack/test/template/form_options_helper_test.rb
* Change tabs to spaces in form options helper [ci skip]Carlos Antonio da Silva2013-02-211-2/+2
|
* Add another NumberHelper missing dependencyRodrigo Rosenfeld Rosas2013-01-291-0/+1
| | | | | Another missing dependency, now affecting #number_to_percentage. It depends on reverse_merge.
* Add NumberHelper missing dependencyRodrigo Rosenfeld Rosas2013-01-291-0/+1
| | | symbolize_keys depends on hash/keys AS core extension
* Do not call fields_for from form_for, to avoid instantiating two buildersCarlos Antonio da Silva2013-01-061-8/+6
| | | | | | Conflicts: actionpack/lib/action_view/helpers/form_helper.rb actionpack/test/template/form_helper_test.rb
* Merge pull request #8719 from pcasaretto/fix-actionview-doc-typoCarlos Antonio da Silva2013-01-031-1/+1
| | | | Fix typo on form_tag_helper.rb [ci skip]
* fix block.arity raise nil error when not given a block to "content_tag_for"jasl2013-01-021-1/+3
|
* Make distance_of_time_in_words work with DateTime offsetsAndrew White2012-12-041-2/+3
| | | | | | | | | | | | | | | Because DateTime#to_time returns self when it has a non-zero offset and subtracting two DateTime instances returns a Rational then the distance_of_time_in_words methods outputs an incorrect value. This is fixed in master because we can rely on Ruby 1.9.3's implementation of to_time but it can't be fixed on Ruby 1.8.7 as there is no way to map the DateTime to a Time with a non-zero offset. We can workaround the problem by casting to Float before doing the subtraction in the distance_of_time_in_words method. Closes #8390
* Make output of distance_of_time_in_words consistentAndrew White2012-12-041-2/+2
| | | | | | | | | | This commit fixes the output of distance_of_time_in_words when using integer or duration arguments. Previously a distance of more than 30 seconds would be output as 'Less than 1 minute' when using integer arguments and '1 minute' when using two Time instances more than 30 seconds apart. Cherry picked from 5fdd4cd9e47be972f146a8a17a74c8f4700e2ac0
* Add i18n scope to disance_of_time_in_words.Steve Klabnik2012-11-261-3/+7
| | | | This is a backport of rails/rails#7997.
* [ci skip] Correct examples for form_tag helper.DawidJanczak2012-11-141-2/+2
|
* Merge pull request #8108 from Casecommons/fix-multiple-and-index-in-instance-tagRafael Mendonça França2012-11-081-1/+3
| | | | | | | Support :multiple option on input tags that also have :index Conflicts: actionpack/lib/action_view/helpers/tags/base.rb actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
* Accept :remote as symbol in link_to optionsRiley2012-10-061-1/+3
| | | | | Accept either :remote or 'remote' in both the html_options and (url_)options hash arguments to link_to.
* correct handling of date selects when using both disabled and discard optionsVasiliy Ermolovich2012-08-251-2/+5
| | | | | | | | | | | | 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
* Merge pull request #7410 from sandeepravi/default_options_helper_valueRafael Mendonça França2012-08-211-0/+1
| | | | | | option_tags coerced to "" instead of nil Closes #7404
* Merge branch '3-2-8' into 3-2-stableSantiago Pastorino2012-08-092-3/+3
|\
| * Do not mark strip_tags result as html_safeSantiago Pastorino2012-08-091-1/+1
| | | | | | | | | | | | Thanks to Marek Labos & Nethemba CVE-2012-3465
| * escape select_tag :prompt valuesSantiago Pastorino2012-08-091-2/+2
| | | | | | | | CVE-2012-3463
* | Rearrange example output of javascript_include_tagPrem Sichanugrist2012-08-061-2/+2
| |
* | Do not include application.js if it doesn't existsPrem Sichanugrist2012-08-061-5/+6
|/ | | | | | Rails were including 'application.js' to the pack when using `javascript_include_tag :all` even there's no application.js in the public directory.
* Revert "Deprecate link_to_function and button_to_function helpers"Rafael Mendonça França2012-08-011-4/+0
| | | | This reverts commit 9dc57fe9c4807fc0ad4b1590a931891d9faa3164.
* Revert "Deprecate `:mouseover` options for `image_tag` helper."Rafael Mendonça França2012-08-011-2/+0
| | | | | | | This reverts commit 1aff7725c7a04cde202cca906208560a55409e6a. Conflicts: actionpack/CHANGELOG.md
* Revert "Deprecate `:confirm` in favor of `:data => { :confirm => 'Text' }` ↵Rafael Mendonça França2012-08-013-29/+9
| | | | | | | | | | | option" Revert "Deprecate `:disable_with` in favor of `'data-disable-with'` option for `button_to` and `submit_tag` helpers." This reverts commit fc092a9cba5fceec38358072e50e09250cf58840. This reverts commit e9051e20aeb2c666db06b6217954737665878db7. This reverts commit d47d6e7eda3aa3e6aa28d0c17ac6801234bb97d1. This reverts commit 21141e777bdce8534e3755c8de7268324b3d8714.
* Fixed bug creating invalid HTML in select optionsRusty Geldmacher2012-07-101-5/+5
| | | | | | | | | When a select tag is created for a field with errors, and that select tag has :prompt or :include_blank options, then the inserted first option will errantly have a <div class="field_with_errors"> wrapping it. See https://github.com/rails/rails/issues/7017
* Fix NumberHelper options wrapping to prevent verbatim blocks being rendered ↵Mark J. Titorenko2012-07-021-90/+159
| | | | | | | | | | instead of line continuations. While I'm at it, wrap long comment lines consistently. Conflicts: actionpack/lib/action_view/helpers/number_helper.rb There was just one conflict related to the addition of the :format option to number_to_percentage.
* ActionController::Metal doesn't have logger method, check it and then delegateDmitry Vorotilin2012-06-161-2/+4
|
* Deprecate `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-06-052-2/+13
| | | | | | | | | | | | This deprecation applies to: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag` As :confirm is an UI specific option is better to use the data attributes, teaching users about unobtrusive JavaScript and how Rails works with it.
* Fixed tag_helper data-attribute bug with BigDecimalsBodacious2012-05-201-1/+1
|
* Use right option for excerpt text helper in tests, fix buildCarlos Antonio da Silva2012-05-191-2/+2
| | | | | | | `excerpt` text helper uses `:radius`, not `line_width` (that is used by `word_wrap` helper). Also cleanup some whitespaces.
* Merge pull request #5020 from KL-7/fix-blank-image_tag-sourceJosé Valim2012-05-181-2/+2
| | | | Render img tag with empty src if empty string is passed to image_tag.
* Deprecate old APIs for highlight, excerpt and word_wrapJeremy Walker2012-05-181-0/+9
|
* Deprecate `:disable_with` for `button_tag` tooCarlos Galdino + Rafael Mendonça França2012-05-142-2/+4
|
* Fix typoCarlos Galdino + Rafael Mendonça França2012-05-141-1/+1
|
* Deprecate `:disable_with` in favor of `'data-disable-with'` option for ↵Carlos Galdino + Rafael Mendonça França2012-05-142-6/+13
| | | | `button_to` and `submit_tag` helpers.
* Deprecate `:mouseover` options for `image_tag` helper.Rafael Mendonça França2012-05-131-0/+2
|
* Merge pull request #3237 from sakuro/data-url-schemeRafael Mendonça França2012-05-131-1/+1
| | | | Support data: url scheme
* Deprecate link_to_function and button_to_function helpersRafael Mendonça França2012-04-301-0/+4
|
* Add missing require when helpers are used in isolationRafael Mendonça França2012-04-301-0/+1
|
* Lazy load `default_form_builder` if it's passed as a stringPiotr Sarnacki2012-04-281-1/+7
| | | | closes #3341
* Do not mutate options hashCarlos Antonio da Silva2012-04-271-2/+2
|
* fix number_to_human docs [ci skip]Vijay Dev2012-04-261-2/+2
|
* Cover one more case in auth_token and remote formsPiotr Sarnacki2012-03-281-1/+1
| | | | | If embedding auth_token in remote forms is off and we pass a value for auth_token it should respect it.
* Added config.action_view.embed_authenticity_token_in_remote_formsPiotr Sarnacki2012-03-281-8/+16
| | | | | | | | There is a regression introduced in 16ee611fa, which breaks remote forms that should also work without javascript. This commit introduces config option that allows to configure this behavior defaulting to the old behavior (ie. include authenticity token in remote forms by default)
* Merge pull request #5622 from rafaelfranca/fix-2492-3-2Jeremy Kemper2012-03-271-2/+3
|\ | | | | [3-2-stable] Fix label_tag to merge the options hash with the object hash
| * Check if the options hash already exists and merge it with the anotherRafael Mendonça França2012-03-271-10/+5
| | | | | | | | | | | | hash. Closes #2492 and #5614
| * Fixing issue #2492. ActionView::Base.field_error_proc doesn't call for label.Andrey Samsonov2012-03-271-2/+8
| | | | | | | | | | | | objectify_options method should be applied to the proper options arg. See explanation and example of the bug - https://github.com/kryzhovnik/rails_field_error_proc_bug_example
* | Don't break Haml with textarea newline fix.James Coleman2012-03-272-2/+6
|/ | | | | | See issue #393, issue #4000, issue #5190, and issue #5191. Adds a newline after the textarea opening tag based on @codykrieger's original patch so that we don't cause regressions in Haml-using apps. The regression caused textarea tags to add newlines to the field unintentionally (each update/save added an extra newline.) Also fix 6 more tests that didn't yet have the newline expectation.
* apply form_for namespace option to date_selectSergey Nartimov2012-03-261-1/+4
|
* Allow you to force the authenticity_token to be rendered even on remote ↵David Heinemeier Hansson2012-03-141-5/+9
| | | | forms if you pass true