aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
Commit message (Collapse)AuthorAgeFilesLines
* No more no changes entries in the CHANGELOGsGenadi Samokovarov2015-12-211-3/+0
| | | | | | | | | | | | | | During the `5.0.0.beta1` release, the CHANGELOGs got an entry like the following: ``` * No changes. ``` It is kinda confusing as there are indeed changes after it. Not a biggie, just a small pass over the CHANGELOGs. [ci skip]
* fix typo in config value [ci skip]yuuji.yaginuma2015-12-191-1/+1
|
* Add CHANGELOG headers for Rails 5.0.0.beta1eileencodes2015-12-181-0/+5
|
* Merge pull request #22462 from lxsameer/i18n_html_wrapRafael França2015-12-184-0/+30
|\ | | | | wrapping i18n missing keys made optional
| * debug_missing_translation configuration added to action_viewSameer Rahmani2015-12-184-0/+30
| | | | | | | | | | | | | | | | | | `I18n.translate` helper will wrap the missing translation keys in a <span> tag only if `debug_missing_translation` configuration has a truthy value. Default value is `true`. For example in `application.rb`: # in order to turn off missing key wrapping config.action_view.debug_missing_translation = false
* | Change `alpha` to `beta1` to prep for release of Rails 5eileencodes2015-12-181-1/+1
| | | | | | | | :tada: :beers:
* | Merge pull request #20797 from byroot/prevent-url-for-ac-parametersRafael França2015-12-181-9/+0
|\ \ | |/ |/| Prevent ActionController::Parameters in url_for
| * Prevent ActionController::Parameters from being passed to url_for directlyJean Boussier2015-12-151-9/+0
| |
* | Merge pull request #21914 from zachalewel/zachalewel-patch-1Matthew Draper2015-12-181-8/+8
|\ \ | | | | | | | | | Update CHANGELOG.md for readability
| * | Update CHANGELOG.mdZach Alewel2015-10-081-1/+1
| | |
| * | Update CHANGELOG.md for readabilityZach Alewel2015-10-081-1/+1
| | |
* | | Add missing test cases for asset_pathAkshay Vishnoi2015-12-171-0/+2
| | |
* | | deletes commented code introduced in db045db (initial commit)Tony Ta2015-12-151-17/+0
| | |
* | | deletes commented code introduced in 4673c47dTony Ta2015-12-151-5/+0
| | |
* | | Remove ActionView::Helpers::CacheHelper#fragment_cache_keySam Stephenson2015-12-142-8/+4
| |/ |/| | | | | | | | | Introduced in e56c63542780fe2fb804636a875f95cae08ab3f4, `CacheHelper#fragment_cache_key` is a duplicate of `ActionController::Caching::Fragments#fragment_cache_key`. We now require the view to provide this method on its own (as with `view_cache_dependencies`); `ActionController::Caching::Fragments` exports its version as a `helper_method`.
* | [ci skip] Add a dollar sign to each command in the READMEsElektron1c972015-12-061-2/+1
| | | | | | | | | | | | According to pr #22443 in the guides there's always a dollar sign before every command, so why is in the main README a `$` and in every submodule a `%`? Just eye candy..
* | Merge pull request #21241 from pdg137/masterArthur Nogueira Neves2015-11-261-0/+4
|\ \ | | | | | | In url_for, never append ? when the query string is empty anyway.
| * | In url_for, never append ? when the query string is empty anyway.Paul Grayson2015-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to behave like this: url_for(controller: 'x', action: 'y', q: {}) # -> "/x/y?" We previously avoided empty query strings in most cases by removing nil values, then checking whether params was empty. But as you can see above, even non-empty params can yield an empty query string. So I changed the code to just directly check whether the query string ended up empty. (To make everything more consistent, the "removing nil values" functionality should probably move to ActionPack's Hash#to_query, the place where empty hashes and arrays get removed. However, this would change a lot more behavior.)
* | | Merge pull request #17013 from gsamokovarov/fix-null-resolverSean Griffin2015-11-231-2/+1
|\ \ \ | | | | | | | | Fix improper value types used to instantiate a Template in AV::NullResol...
| * | | Fix improper value types used to instantiate a Template in AV::NullResolverGenadi Samokovarov2014-09-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to provide a reproducible test for #17008 I stumbled on this one. Seems to be quite an old piece of code, but its definitely useful in situations like the reproducible test cases like the one above.
* | | | Bring back `===` stubbing in `time_zone_select` test.Kasper Timm Hansen2015-11-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Erroneously removed in 58910dc7. The stubbing was a regression test to ensure `time_zone_select` wasn't implemented with `grep`. Rename the test and add a comment to make the intent clearer.
* | | | Ditch `each_with_index` for `each`.Kasper Timm Hansen2015-11-221-1/+1
| | | | | | | | | | | | | | | | We never touch the index, so don't bother.
* | | | Don't cache fake time zones.Kasper Timm Hansen2015-11-221-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling `test_time_zone_select_with_priority_zones_as_regexp` it would define `=~` on the fake zones, but it would never be cleaned up because of the zone cache. Nuke it so `test_time_zone_select_with_priority_zones_as_regexp_using_grep_finds_no_zones` accidentally find any zones because of `=~` being implemented.
* | | | Merge pull request #21615 from ronakjangir47/actionViewpart2Kasper Timm Hansen2015-11-225-79/+133
|\ \ \ \ | | | | | | | | | | Removed Mocha from Action View
| * | | | Removed Mocha from Action ViewRonak Jangir2015-09-235-79/+133
| | | | |
* | | | | Example of setting data attributes for image_tagNishant Modak2015-11-202-1/+4
| | | | |
* | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-11-151-1/+1
|\ \ \ \ \
| * | | | | [ci skip] Use full component name in public API documentyui-knk2015-11-151-1/+1
| | |_|/ / | |/| | |
* | | | | Merge pull request #22280 from yui-knk/fix_chagnelog_actionviewRichard Schneeman2015-11-121-1/+1
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Fix CHANGELOG.md format from list to italic.
| * | | | | [ci skip] Fix CHANGELOG.md format from list to italic.yui-knk2015-11-131-1/+1
| | | | | |
* | | | | | Respect value of `:object` if `:object` is false when renderingyui-knk2015-11-134-1/+10
|/ / / / / | | | | | | | | | | | | | | | | | | | | This commit fixes the bug convering `false` to `locals[as]` when `options[:object]` is `false` (close #22260).
* | | | | Fix week_field returning invalid valueChristoph2015-11-103-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the W3 spec[1] the value should use a 1-based index and not a 0-based index for the week number. [1]: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
* | | | | fix method name typo [ci skip]yuuji.yaginuma2015-11-091-1/+1
| | | | |
* | | | | Allow `host` option in javscript and css helpersGrzegorz Witek2015-11-083-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Now both `javascript_include_tag` and `stylesheet_tag` can accept `host` option to provide custom host for the asset
* | | | | Require only necessary concurrent-ruby classes.Jerry D'Antonio2015-11-044-4/+4
| | | | |
* | | | | Don’t allow arbitrary data in back urlsDamien Burke2015-11-033-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `link_to :back` creates a link to whatever was passed in via the referer header. If an attacker can alter the referer header, that would create a cross-site scripting vulnerability on every page that uses `link_to :back` This commit restricts the back URL to valid non-javascript URLs. https://github.com/rails/rails/issues/14444
* | | | | Add tests to make sure mail_to work with nil and SafeBufferRafael Mendonça França2015-11-031-0/+14
| | | | |
* | | | | Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-034-16/+38
|/ / / /
* | | | Fix style issues with #16252Sean Griffin2015-10-292-12/+9
| | | |
* | | | making selected value to accept Hash like the default option. E.g. selected: ↵Lecky Lao2015-10-293-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {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
* | | | Merge pull request #22116 from gsamokovarov/fix-form-for-block-testYves Senn2015-10-291-2/+3
|\ \ \ \ | | | | | | | | | | Fix a faulty form_for test
| * | | | Fix a faulty form_for testGenadi Samokovarov2015-10-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stumbled upon this one while trying to deprecate the String/Symbol passing to `form_for`. This test passed on an accident, because the signature of `form_for` currently accepts 2 positional arguments and a block. Calling it with the wrong number of arguments caused: ```ruby (byebug) form_for(:post, @post, html: { id: 'create-post' }) *** ArgumentError Exception: wrong number of arguments (3 for 1..2) ``` This made the test pass, because it was still an `ArgumentError`. :-)
* | | | | Ignore scope in missing translation input.Kasper Timm Hansen2015-10-282-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's already represented in the key name. Demonstrate with a test. Also test that the default isn't output.
* | | | | Tweaked wording used in some tests.Sebastian McKenzie2015-10-251-1/+1
| | | | |
* | | | | Collection check boxes propagates input's id to the label's for attribute.Vasiliy Ermolovich2015-10-203-0/+18
| | | | |
* | | | | Delete needless `require 'active_support/deprecation'`yui-knk2015-10-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | When `require 'active_support/rails'`, 'active_support/deprecation' is automatically loaded.
* | | | | Merge pull request #21894 from abhishekjain16/refactor_with_dryRafael Mendonça França2015-10-081-10/+6
|\ \ \ \ \ | |_|_|_|/ |/| | | | Follow DRY principle and remove duplication
| * | | | Follow DRY principle and remove duplicationAbhishek Jain2015-10-081-10/+6
| | | | |
* | | | | [ci skip] fix typoAbhishek Jain2015-10-071-1/+1
|/ / / /
* | | | Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compatJeremy Daer2015-10-063-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries that support multiple Rails versions would've had to feature-detect whether to use `Mime::Type[:FOO]` or `Mime::FOO`. `Mime[:foo]` has been around for ages to look up registered MIME types by symbol / extension, though, so libraries and plugins can safely switch to that without breaking backward- or forward-compatibility. Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup by type or extension, so it's not available as `Mime[:all]`. We use it internally as a wildcard for `respond_to` negotiation. If you use this internal constant, continue to reference it with `Mime::ALL`. Ref. efc6dd550ee49e7e443f9d72785caa0f240def53