aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
Commit message (Collapse)AuthorAgeFilesLines
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-102-344/+3
|
* Update rails-dom-testing gem to 2.0Connor Shea2016-05-091-1/+1
| | | | Resolves #24924.
* Merge pull request #24929 from rosenfeld/patch-6Santiago Pastorino2016-05-091-1/+18
|\ | | | | Improve AV changelog with regards to default RAW handler
| * Improve AV changelog with regards to default RAW handlerRodrigo Rosenfeld Rosas2016-05-091-1/+18
| | | | | | | | It highlights which kind of incompatibilities this could lead to when rendering plain JS or HTML partials.
* | Extract resolver cache disabling to a method.Kasper Timm Hansen2016-05-091-22/+23
| | | | | | | | Will be using this in later code.
* | No need to call `remove_template`.Kasper Timm Hansen2016-05-091-1/+0
|/ | | | | Each test executes in another tmp folder, so there's no chance of polluting another test run.
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-062-2/+7
|
* Push action_view.collection_caching to be called towards the end, since it ↵Vipul A M2016-04-281-4/+4
| | | | | | | depends on being called after action_controller.set_configs. This causes, other AV initializers after it to be called after all of AC initializers, which get pulled in before since action_controller.set_configs gets called. Hence, push initializer depending on after hook, to be called after all initializers for this railtie are done.
* Prep Rails 5 beta 4eileencodes2016-04-272-1/+3
|
* Respect gospel of Railties Gods: no on_load with after.Kasper Timm Hansen2016-04-271-3/+1
| | | | | | We don't need no stinking `on_load` where we're going! Because people far wiser than me (@rafaelfranca and @jeremy) know that passing `:after` means the lib is already loaded.
* make the collection_caching initializer run after the Action Controller ↵Lachlan Sylvester2016-04-271-1/+1
| | | | configs are setup
* 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 #20625 from Envek/add_country_zones_methodJeremy Daer2016-04-191-4/+5
|\ | | | | | | Add ActiveSupport::TimeZone.country_zones helper
* \ Merge pull request #24225 from ↵Rafael Mendonça França2016-04-203-3/+439
|\ \ | | | | | | | | | | | | | | | 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-053-3/+439
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* | | Add CHANGELOG entry for #23869Rafael Mendonça França2016-04-201-0/+4
| | | | | | | | | | | | [ci skip]
* | | Merge pull request #23869 from oreoshake/to-sentence-html-safetyRafael França2016-04-202-0/+85
|\ \ \ | | | | | | | | Add html_safe support to ActionView Array#OutputSafetyHelper
| * | | mimic ActiveSupport's Array#to_sentence in an html_safe-aware wayNeil Matatall2016-03-152-0/+85
| | | |
* | | | Ensure Cache#inspect doesn't block concurrent cache writesJeremy Daer2016-04-192-0/+11
| |_|/ |/| | | | | | | | | | | | | | | | | Object#inspect recursively inspects instance variables, exposing all internal state, including sensitive internal cache objects. Override Cache#inspect to give a high-level summary that never interferes with concurrent cache writes.
* | | Add render allows unicode text name in partials - 🍣Vipul A M2016-04-172-0/+5
| | |
* | | Improved ActionView flows.rb documention [ci skip]Alex Mirkhaydarov2016-04-111-5/+4
| |/ |/|
* | `number_to_phone` formats number with regexpPan GaoYong2016-04-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | By default, this method formats US number. This commit extends its functionality to format number for other countries with a custom regular expression. number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/) # => 188-1234-5678 The output phone number is divided into three groups, so the regexp should also match three groups of numbers.
* | Merge pull request #24379 from Gaurav2728/sanitizer-helper-update-docKasper Timm Hansen2016-03-311-1/+1
|\ \ | | | | | | sanitiser helper may be remove in 5.1, update doc [ci skip]
| * | sanitiser helper may be remove in 5.1, update doc [ci skip]Gaurav Sharma2016-03-311-1/+1
| | | | | | | | | using `rails-html-sanitizer` gem still Rails providing strip_tags, strip_links features. May be remove in 5.1
* | | Deprecate `datetime_field` and `datetime_field_tag` helpers.Wojciech Wnętrzak2016-03-315-9/+41
|/ / | | | | | | | | Datetime input type was removed from HTML specification. One can use `datetime_local_field` and `datetime_local_field_tag` instead.
* | set in no more used in ActionView::Template::TypesGaurav Sharma2016-03-251-1/+0
| | | | | | | | | | initially set is used for template type https://github.com/rails/rails/commit/67f55e28 after this commit https://github.com/rails/rails/commit/91f2ad36 it’s not require
* | guides, sync 5.0 release notes with changelogsYves Senn2016-03-221-1/+1
| | | | | | | | | | | | | | | | [ci skip] Sync AV, AR, AJ, AS, AM changelogs with our 5.0 release notes draft. This is a follow up to c94045d and contains changes made since the release of beta1.
* | fix a comment in atom_feed_helper.rb白井 健太2016-03-161-1/+1
| |
* | silence deprecation message for dynamic controller and actions on Action ↵yuuji.yaginuma2016-03-131-1/+3
| | | | | | | | | | | | View test Follow up to #23980.
* | Break up a circular require between AP/AVSean Griffin2016-03-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now referencing the constant `AbstractController::Rendering` causes `ActionView::Base` to be loaded, and thus the load hooks for action_view are run. If that load hook references any part of action view that then references action controller (such as `ActionView::TestCase`), the constant `AbstractController::Rendering` will attempt to be autoloaded and blow up. With this change, `ActionView::LoadPaths` no longer requires `ActionView::Base` (which it had no reason to require). There was a needed class from `AbstractController::Base` in the Rendering module, which I've moved into its own file so we don't need to load all of `AbstractController::Base` there. This commit fixes https://github.com/rails/rails-controller-testing/issues/21
* | Merge pull request #24129 from dharamgollapudi/rename_dependencies_rakeRafael França2016-03-112-1/+1
|\ \ | | | | | | Rename dependencies.rake to cache_digests.rake
| * | Rename dependencies.rake to cache_digests.rakeDharam Gollapudi2016-03-092-1/+1
| | | | | | | | | | | | | | | | | | | | | As the tasks are related to cache_digests and as they are already namespaced under cache_digests, renaming to cache_digests.rake makes it to know where to find these tasks.
* | | revises whitespace in the gemspec of AV [ci skip]Xavier Noria2016-03-101-4/+4
| | |
* | | revises the homepage URL in the gemspecs [ci skip]Xavier Noria2016-03-101-1/+1
|/ / | | | | | | References https://github.com/rails/homepage/issues/46.
* | Revert "Merge pull request #24125 from dharamgollapudi/patch-3"Matthew Draper2016-03-101-0/+0
| | | | | | | | | | This reverts commit b3c487515c11c367855eda7742bda4a3d680b740, reversing changes made to 4b43651884309c0f5be4dbdd11ea4d16fb880c30.
* | Rename dependencies.rake to cache_digests.rakeDharam Gollapudi2016-03-091-0/+0
| | | | | | | | | | | | As the tasks are related to cache_digests and as they are already namespaced under cache_digests, renaming to cache_digests.rake makes it to know where to find these tasks.
* | - Freeze strings in frequent used private methodStan Lo2016-03-081-11/+11
| | | | | | | | | | reduce string allocation. - Use freezed empty string instead of create one every time we need to return it
* | Silence deprecation message for dynamic controller and actions on ↵Mehmet Emin İNAÇ2016-03-071-6/+8
| | | | | | | | action_view test cases
* | Revert "Merge pull request #22764 from ↵Rafael Mendonça França2016-03-053-44/+3
| | | | | | | | | | | | | | | | | | | | stevenspiel/titleize_model_name_for_default_submit_button_value" This reverts commit 4158974c60d817c9bc1e2aecb342161295f2ac0d, reversing changes made to 3d590add45b7ff1de972d99b076cb504d5208935. Reason: This break i18n in some languages. See https://github.com/rails/rails/issues/791#issuecomment-192724640
* | We're not using $2 from this RegexpAkira Matsuda2016-03-051-1/+1
| | | | | | | | https://github.com/rails/rails/pull/24052/files#r55083975
* | Fix partial rendering with dot in filenameBenjamin Quorning2016-03-043-1/+7
| | | | | | | | | | | | | | | | When rendering a collection with a partial whose filename contains a dot, e.g. "customer.mobile", we would set a `locals[:'customer.mobile']` variable instead of, as in earlier versions of Rails, `locals[:customer]`. This bug was introduced in da9038eaa5d19c77c734a044c6b35d7bfac01104.
* | Fix CHANGELOG spacing [ci skip]Jeremy Daer2016-03-021-4/+4
| |
* | Merge pull request #23932 from arthurnn/arthurnn/remove_load_pathsArthur Nogueira Neves2016-03-011-2/+0
|\ \ | | | | | | Remove load_paths file
| * | Remove load_paths fileArthur Neves2016-02-271-2/+0
| | |
* | | Support `:any` variants lookup in `PathResolver`Godfrey Chan2016-03-012-6/+21
|/ / | | | | | | | | | | | | | | `OptimizedFileSystemResolver` (which most Rails apps use), but did not implement the feature on the more generic `PathResolver`, which is often used in tests etc. Fixes #23881
* | Add CHANGELOG entry for "Rendering ..." loggingPrem Sichanugrist2016-02-261-0/+6
| |
* | Update to use Subscriber#start insteadPrem Sichanugrist2016-02-262-7/+15
| | | | | | | | | | | | | | | | We don't need to instrument another event as `ActiveSupport::LogSubscriber` already tracks when the instrumentation starts. Close #23717
* | Added log "Rendering ...", when starting to render a template, to log that ↵Vipul A M2016-02-263-3/+16
| | | | | | | | | | | | | | | | we have started to render something, at the very beginning. This helps to easily identify queries from controller vs views Fixes #23710
* | Lock down new `ImplicitRender` behavior for 5.0 RCGodfrey Chan2016-02-254-4/+39
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Conceptually revert #20276 The feature was implemented for the `responders` gem. In the end, they did not need that feature, and have found a better fix (see plataformatec/responders#131). `ImplicitRender` is the place where Rails specifies our default policies for the case where the user did not explicitly tell us what to render, essentially describing a set of heuristics. If the gem (or the user) knows exactly what they want, they could just perform the correct `render` to avoid falling through to here, as `responders` did (the user called `respond_with`). Reverting the patch allows us to avoid exploding the complexity and defining “the fallback for a fallback” policies. 2. `respond_to` and templates are considered exhaustive enumerations If the user specified a list of formats/variants in a `respond_to` block, anything that is not explicitly included should result in an `UnknownFormat` error (which is then caught upstream to mean “406 Not Acceptable” by default). This is already how it works before this commit. Same goes for templates – if the user defined a set of templates (usually in the file system), that set is now considered exhaustive, which means that “missing” templates are considered `UnknownFormat` errors (406). 3. To keep API endpoints simple, the implicit render behavior for actions with no templates defined at all (regardless of formats, locales, variants, etc) are defaulted to “204 No Content”. This is a strictly narrower version of the feature landed in #19036 and #19377. 4. To avoid confusion when interacting in the browser, these actions will raise an `UnknownFormat` error for “interactive” requests instead. (The precise definition of “interactive” requests might change – the spirit here is to give helpful messages and avoid confusions.) Closes #20666, #23062, #23077, #23564 [Godfrey Chan, Jon Moss, Kasper Timm Hansen, Mike Clark, Matthew Draper]