aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Override <%== to always behave as literal text rather than toggling based on ↵Jeremy Kemper2012-12-031-0/+11
| | | | | | | whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged. Conflicts: actionpack/test/template/template_test.rb
* Merge pull request #8402 from ↵Rafael Mendonça França2012-12-021-1/+1
| | | | | | | | | senny/8376_descriptive_error_message_for_partial_layout_true More descriptive error when rendering a partial with `:layout => true` Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_view/renderer/partial_renderer.rb
* Add i18n scope to disance_of_time_in_words.Steve Klabnik2012-11-261-3/+7
| | | | This is a backport of rails/rails#7997.
* Merge pull request #8235 from tilsammans/dont_escape_actionmailer_when_plaintextJosé Valim2012-11-161-0/+5
| | | | | | | | Introduce `ActionView::Template::Handlers::ERB.escape_whitelist` Conflicts: actionpack/CHANGELOG.md actionpack/test/template/template_test.rb
* [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
* Revert "Merge pull request #7797 from ↵Rafael Mendonça França2012-10-301-3/+3
| | | | | | | | | | | | | | | | | senny/7459_prefix_tempalte_assertion_variables" This reverts commit 2bad605873b5b720d77ae6388a995827ab7fe705. Conflicts: actionpack/CHANGELOG.md Reason: This added a regression related with shoulda-matchers, since it is expecting the instance variable @layouts See https://github.com/thoughtbot/shoulda-matchers/blob/9e1188eea68c47d9a56ce6280e45027da6187ab1/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb#L74 This will introduce back #7459 but this stable release will be backward compatible. Related with #8068.
* 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.
* Merge pull request #7797 from senny/7459_prefix_tempalte_assertion_variablesRafael Mendonça França2012-10-011-3/+3
| | | | | | | | | prefix TemplateAssertions ivars. Closes #7459 Conflicts: actionpack/lib/action_controller/test_case.rb actionpack/lib/action_view/test_case.rb
* 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.
* Merge pull request #6649 from route/logger_in_metal_3_2Carlos Antonio da Silva2012-06-181-2/+4
|\ | | | | Logger in metal backport for 3.2
| * ActionController::Metal doesn't have logger method, check it and then delegateDmitry Vorotilin2012-06-161-2/+4
| |
* | Merge pull request #6752 from steveklabnik/fix_5680Rafael Mendonça França2012-06-161-1/+7
|/ | | | Respect absolute paths in compute_source_path.
* 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.
* Allow to use mounted helpers in ActionView::TestCasePiotr Sarnacki2012-06-011-1/+2
| | | | | Similarly to 6525002, this allows to use routes helpers for mounted helpers, but this time in ActionView::TestCase
* Merge pull request #6410 from Bodacious/tag_helper_data_fix_3-2-stableRafael Mendonça França2012-05-201-1/+1
|\ | | | | TagHelper creates invalid data attributes when value is a BigDecimal
| * Fixed tag_helper data-attribute bug with BigDecimalsBodacious2012-05-201-1/+1
| |
* | Merge pull request #6407 from pinetops/565c1b0a0772ac6cf91c77e9285806f7b028614cJosé Valim2012-05-201-10/+22
|\ \ | |/ |/| Template concurrency fixes
| * Prevent concurrent compilation of templates - closes #6400Tom Clarke2012-05-201-10/+22
| |
| * Set proper rendered_format when doing render :inlineSantiago Pastorino2012-03-281-2/+2
| | | | | | | | Closes #5632
| * 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.
| * Merge pull request #5633 from drogus/embed-auth-token-in-remote-formsSantiago Pastorino2012-03-282-8/+24
| | | | | | | | Embed auth token in remote forms
| * Merge pull request #5619 from jcoleman/textarea-newline-fix-breaks-hamlSantiago Pastorino2012-03-272-2/+6
| | | | | | | | Textarea newline fix breaks haml (3-2-stable)
* | 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-132-2/+2
| | | | | | | | 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