aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge pull request #23695 from kaspth/remove-automatic-collection-cachingKasper Timm Hansen2016-02-203-61/+46
| |\ | | | | | | Make collection caching explicit.
| | * Instrument cached collection renders.Kasper Timm Hansen2016-02-201-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Augments the collection caching with some instrumentation that's logged. For collections that have been cached like: ```ruby <%= render partial: 'notifications/notification', collection: @notifications, cached: true %> ``` We'll output a line showing how many cache hits we had when rendering it: ``` Rendered collection of notifications/_notification.html.erb [0 / 100 cache hits] (3396.5ms) ```
| | * Make collection caching explicit.Kasper Timm Hansen2016-02-202-58/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having collection caching that wraps templates and automatically tries to infer if they are cachable proved to be too much of a hassle. We'd rather have it be something you explicitly turn on. This removes much of the code and docs to explain the previous automatic behavior. This change also removes scoped cache keys and passing cache_options.
* | | Merge branch 'master' into treewipAaron Patterson2016-02-191-2/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: eliminate warnings about multiple primary keys on habtm join tables Add methods to array delegation from `Relation` Fix button_to's params option to support nested names. Dependencies clean up Deprecate AC::Parameters#== with a Hash Fix AC::Parameters#== with other AC::Parameters Tests for AC::Parameters#== better docs for ActiveSupport::TestCase#assert_nothing_raised remove needless `debug_exception_response_format` config [ci skip] partial pass over the API guide [ci skip] Fix `unsubscribed` server side behavior Use a semaphore to signal message availability Fix master build Remove github gems from the master bug report templates Truncate ActionCable broadcast message to 300 chars Remove unused require
| * | Merge pull request #17043 from jcoleman/fix-nested-params-in-button-toRafael França2016-02-191-2/+44
| |\ \ | | |/ | |/| Fix button_to's params option to support nested names.
| | * Fix button_to's params option to support nested names.James Coleman2016-02-191-2/+44
| | | | | | | | | | | | | | | | | | In e6e0579defcfcf94ef1c4c1c7659f374a5335cdb the `params` option was added to the `button_to` helper. However, the patch doesn't support nested hashes so `{a: {b: 'c'}}` for example gets turned into a hidden form input with the name 'a' and the value being the string representation of the `{b: 'c'}` nested hash. Since Rails supports nested hashes everywhere else (and even in the URL params of link_to and button_to), I believe this to be a bug/unfinished feature.
* | | push injected dependencies up to the `digest` methodAaron Patterson2016-02-181-2/+2
| | | | | | | | | | | | | | | | | | Only the root node has injected dependencies, so we don't need to care about them at lower levels. This change pushes the injected dependencies up to where the user passed them in.
* | | use the class level digest method for calculating the digestAaron Patterson2016-02-181-3/+1
| | |
* | | cache all subnodes in the digest cacheAaron Patterson2016-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | this is for backwards compatibility. We should remove this after 5-0-stable is created because digest calculation should be amortized. Caching digests of subtrees will speed up digests for other trees that share the same children. However, this will also increase memory, and after the app warms up, then those subtrees will never be reused which means that memory is wasted.
* | | Merge branch 'master' into treewipAaron Patterson2016-02-182-3/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (27 commits) move digest cache on to the DetailsKey object remove object `hash` cache [ci skip] fix suggested change-replace 'an' with 'the in Rails engine guide' Missing documentation about hash algorithm option for MessageVerifier [ci skip] set `skip_listen` option to dummy appplication Fix the language in engines guide Add accidentally removed `#` [ci skip] fields_for_style needs to test for AC::Parameters Fix indentation for code block in changelog Remove accidentally duplicated change log title [ci skip] partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2 Remove needless `case_insensitive_comparison` in mysql2 adapter modify to `error` also abort when specify fail fast option Implement ActionController::Parameters#inspect remove unused method Remove unused Journey code Add Action Cable CHANGELOG in release notes [ci skip] Show proper error message when a non-relation object is passed to AR::Relation#or Fix semantics of test names for finish option in batches_test Fix typo ... Conflicts: actionview/lib/action_view/digestor.rb
| * | move digest cache on to the DetailsKey objectAaron Patterson2016-02-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves digest calculation cache on to the details key object. Before, the digest cache was a class level ivar, and one of the keys was the hash value of the details key object: https://github.com/rails/rails/blob/13c4cc3b5aea02716b7459c0da641438077f5236/actionview/lib/action_view/digestor.rb#L28 An object's hash value is not unique, so it's possible for this cache key to produce colliding keys with no resolution. This commit move cache on to the details key object itself, so we know that the digests are always unique per details key object.
| * | Merge pull request #23662 from rthbound/adds-missing-digestor-nested-deps-testsYves Senn2016-02-172-0/+12
| |\ \ | | | | | | | | adds missing tests for Digestor#nested_dependencies
| | * | adds tests for Digestor#nested_dependenciesRyan T. Hosford2016-02-132-0/+12
| | |/
* | | change internal implementation to use a treeAaron Patterson2016-02-161-13/+10
| | |
* | | fix recursive templatesAaron Patterson2016-02-161-2/+3
| | |
* | | pull template check up to match existing behaviorAaron Patterson2016-02-161-1/+4
| | | | | | | | | | | | also remove the EMPTY node since we won't need it
* | | introduce a `tree` factory method for creating the dep treeAaron Patterson2016-02-161-0/+7
|/ / | | | | | | also add an EMPTY sentinel node
* | Merge pull request #23203 from vipulnsward/22979-show-tags-on-exceptionRichard Schneeman2016-02-161-3/+3
|\ \ | | | | | | WIP: Errors in logs should show log tags as well.
| * | WIP: Errors in logs should show log tags as well.Vipul A M2016-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | - Changed formatted_code_for to return array of logs to be tagged for each line - Changed some render tests to match new behaviour of return Fixes #22979
* | | Test to check if the data-attr if nil is same or notSourav Moitra2016-02-141-0/+6
| |/ |/| | | | | | | | | | | | | | | | | if data attribute is nil it is ignored if value is nil the pair is ignored if value is nil it is skipped Improved test for data attr nil
* | push kwargs up to the user facing APIAaron Patterson2016-02-121-2/+2
| | | | | | | | | | | | | | this lets us leverage Ruby's kwarg handling (exceptions for missing params, etc) ASAP which allows us to skip active support method calls and make sure the exception stack is closer to where the user called the methods.
* | the lookup context looks in the cwd, so prefix isn't necessaryAaron Patterson2016-02-121-2/+1
| |
* | use a real LookupContext in the digest testsAaron Patterson2016-02-121-28/+6
| | | | | | | | | | This will ensure that the digestor stays in parity with the LookupContext object.
* | use assert_not_equal so there will be better error messagesAaron Patterson2016-02-121-1/+1
|/ | | | in the case of failure it is nice to see what the two digests are.
* Add tests to #23288Rafael Mendonça França2016-01-271-0/+1
|
* Fix sanitizer testsJon Moss2016-01-261-3/+3
| | | | | These tests were failing due to backwards incompatible changes, as apart of the v1.0.3 release of rails-html-sanitizer.
* Merge branch '5-0-beta-sec'Aaron Patterson2016-01-251-0/+7
|\ | | | | | | | | | | | | | | | | | | | | * 5-0-beta-sec: bumping version fix version update task to deal with .beta1.1 Eliminate instance level writers for class accessors allow :file to be outside rails root, but anything else must be inside the rails view directory Don't short-circuit reject_if proc stop caching mime types globally use secure string comparisons for basic auth username / password
| * allow :file to be outside rails root, but anything else must be inside the ↵Aaron Patterson2016-01-221-0/+7
| | | | | | | | | | | | rails view directory CVE-2016-0752
* | html_safe is not supposed to be public API for AV. This change removes usage ↵Vipul A M2016-01-209-33/+33
| | | | | | | | | | | | of html_safe in favour of raw() in AV helpers. Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
* | Merge pull request #20046 from yoongkang/ladidaRafael Mendonça França2016-01-161-0/+13
|\ \ | | | | | | | | | Use ActiveSupport::SafeBuffer when flushing content_for
| * | Use ActiveSupport::SafeBuffer when flushing content_forYoong Kang Lim2015-05-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when content_for is flushed, the content was replaced directly by a new value in ActionView::OutputFlow#set. The problem is this new value passed to the method may not be an instance of ActiveSupport::SafeBuffer. This change forces the value to be set to a new instance of ActiveSupport::SafeBuffer.
* | | Merge pull request #20638 from jaimeiniesta/locale-aware-pluralize-helperKasper Timm Hansen2016-01-101-10/+22
|\ \ \ | | | | | | | | Pass the current locale to Inflector from the pluralize text helper.
| * | | Pass the current locale to Inflector from the pluralize text helper.Jaime Iniesta2016-01-101-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pluralize text helper uses the Inflector to determine the plural form. The inflector accepts an optional parameter for the locale, so we can pass it from the text helper to have locale-aware pluralizations on the text helpers level. The pluralize text helper now only accepts 2 positional arguments: `count` and `singular`. Passing `plural` as a positional argument is now deprecated.
* | | | Suppress warning (instance variable @persisted not initialized)yui-knk2016-01-071-0/+1
| | | |
* | | | Merge pull request #22275 from mastahyeti/per-form-csrfRafael França2016-01-061-1/+1
|\ \ \ \ | | | | | | | | | | Per-form CSRF tokens
| * | | | add option for per-form CSRF tokensBen Toews2016-01-041-1/+1
| | | | |
* | | | | Add Html template handler that wraps Raw output in an OutputBufferSantiago Pastorino2016-01-053-1/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This fixes the case when you try to render an html you know safe and the file is named something.html. With this commit the content of the html won't be escaped anymore because AV won't use Raw handler and choose Html handler instead.
* | | | Merge pull request #22764 from ↵Rafael França2016-01-042-3/+41
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | stevenspiel/titleize_model_name_for_default_submit_button_value titleize the model name on default submit buttons
| * | | | downcase default submit button value's model nameSteven Spiel2016-01-012-3/+41
| | |_|/ | |/| |
* | | | Fix collection_radio_buttons' hidden_field name and make it appear before ↵Santiago Pastorino2015-12-312-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | the radios Fixes #22773
* | | | Merge pull request #22829 from jcoyne/test_parametersYves Senn2015-12-301-0/+4
|\ \ \ \ | | | | | | | | | | TestController#parameters returns AC::Parameters
| * | | | TestController#parameters returns AC::ParametersJustin Coyne2015-12-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22827 ActionView::TestCase::TestController#parameters should return an instance of ActionController::Parameters rather than a hash. This enables helper methods to use the correct interface.
* | | | | Fix typoAkshay Vishnoi2015-12-301-1/+1
|/ / / /
* / / / fix TypeError when using submit_tag with Symbol valueyuuji.yaginuma2015-12-241-0/+7
|/ / /
* | | Merge pull request #22462 from lxsameer/i18n_html_wrapRafael França2015-12-181-0/+10
|\ \ \ | | | | | | | | wrapping i18n missing keys made optional
| * | | debug_missing_translation configuration added to action_viewSameer Rahmani2015-12-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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
* | | | 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
| | | |
* | | | 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
| | | |