aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
Commit message (Collapse)AuthorAgeFilesLines
* Freeze string for default content for tag_strings, which later goes on to ↵Vipul A M2016-06-281-1/+1
| | | | create new content. This should also be inline with content being passed should not be mutable
* Document `simple_format` handling of `\r`Derek Prior2016-06-271-4/+5
| | | | | | | `simple_format` handles `\r\n` and `\r` but previously did not document this behavior. The handling is done with a `gsub` in `split_paragraphs`. [ci skip]
* New syntax for tag helpers i.e. tag.br instead of tag(br) #25195Marek2016-06-273-59/+176
|
* Fix typo in exception class nameCédric Félizard2016-06-261-1/+1
|
* Merge pull request #25287 from marekkirejczyk/fix_25267Godfrey Chan2016-06-251-1/+1
|\ | | | | Make select_year work with include_position: true option, fix #25267
| * Make select_year work with include_position: true option, fix #25267Marek2016-06-051-1/+1
| |
* | Change datetime to datetime-local helper tagHerminio Torres2016-06-213-55/+11
| | | | | | | | | | | | | | | | | | | | | | A change was made in the helper that renders the `datetime`, being now by default `datetime-local` and creating an alias of `datetime-local` for `datetime`, `datetime` tag and it passes to be an abstract class for all other tags that inherit from him. As a new specification of the HTML 5 the text field type `datetime` will no longer exist and will pass a `datetime-local`. Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
* | Revert "Merge pull request #17973 from maurogeorge/file_field_hidden_field"eileencodes2016-06-212-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The reason we are reverting this commit is because it created breaking changes for file upload gems. For more information see discussion here: https://github.com/rails/rails/issues/17947#issuecomment-225154294 This reverts commit c455817804e4df64c46c17a0cdec0e5a1ca5ba2e, reversing changes made to 8b3cd74b8a09ef85a43d7631bb062a9ec7f57227. Conflicts: actionview/CHANGELOG.md actionview/lib/action_view/helpers/form_helper.rb
* | Change the raw template handler to render html-safe stringseileencodes2016-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PR #24929 the changelog was updated to make note that while the new template handler was changed to raw this changed the behavior when outputting plain html or js files. Previously ERB would output the files unescaped. Changing the default handler to RAW meant that these same files would be rendered as escaped rather than as js or html. Because of this change in behavior and after the discussion #24949 in we decided to change the behavior of the Raw handler to output html_safe strings by default. Now files rendered with the default handler (raw) render the file unescaped.
* | Fix finding templates for digesting for */* requests that render a ↵Javan Makhmali2016-06-151-3/+6
| | | | | | | | non-default (html) template
* | Explicity find with the rendered format to handle searching multiple view ↵Javan Makhmali2016-06-151-3/+1
| | | | | | | | paths correctly
* | Fix digesting templates with identical logical names when requesting a ↵Javan Makhmali2016-06-151-3/+6
| | | | | | | | format other than the first default
* | Explicitly require `acts_like` in AVSean Griffin2016-06-131-0/+1
| | | | | | | | | | | | This method is used in `distance_of_time_in_words` Fixes #25357
* | remove deprecated `:prefix` option from doc [ci skip]yuuji.yaginuma2016-06-091-2/+0
| | | | | | | | The option was deprecated in #21191.
* | Fix a typo in `time_field` [ci skip]Jake Worth2016-06-051-1/+1
|/
* Confirm with the specification when generating emtpy option for select with ↵Vipul A M2016-05-211-1/+3
| | | | | | | | | | | | `include_blank: true` option. We now generate option with empty label, example: `<select id="places" name="places"><option value="" label=" "></option></select>` for include_blank: true. This is only done, if content is missing on the option, and we providing the value from this option. Fixes #24816
* Revert "Make sure the cache is always populated"Rafael Mendonça França2016-05-201-1/+1
| | | | | | This reverts commit 0ce7eae7418f1b9bb06b351c1f26d50c3674c0d0. Tests were broken https://travis-ci.org/rails/rails/jobs/131850726#L520
* Make sure the cache is always populatedAaron Patterson2016-05-201-1/+1
| | | | This way we don't have to make multiple calls on anonymous controllers
* Merge pull request #25041 from maclover7/jm-actionviewAaron Patterson2016-05-201-9/+3
|\ | | | | [Action View] Don't create middleman `DetailsKey` instance
| * [Action View] Don't create middleman `DetailsKey` instanceJon Moss2016-05-161-9/+3
| | | | | | | | | | All of this is `nodoc`'ed, so we shouldn't have to worry about breaking changes, if there are any -- all internal API :).
* | `md5` --> `MD5`Jon Moss2016-05-171-3/+3
| | | | | | | | | | Sorry, I missed a few places in my last PR. This should be the last of 'em :grimacing:
* | keep layouts + locals from bloating the cacheAaron Patterson2016-05-172-3/+20
|/ | | | | | Using locals will cause layouts to be cached multiple times in the template cache. This commit removes locals from consideration when looking up the layout.
* Remove extranous spaces from assignment.Kasper Timm Hansen2016-05-161-1/+1
| | | | | Leftover from an earlier commit, chose to fix because I was just down in this file.
* Replace middleware with executor callback.Kasper Timm Hansen2016-05-162-8/+1
| | | | | | | | | | | | | Per request digest caches were added before we had hooks into different units of work that Rails performs. As such the most reliable way to prevent stale cache digests was with a middleware. The middleware prevented staleness in Action Controller requests. However, the executor is superior because it should also prevent staleness when running just Active Job jobs or broadcasting through Action Cable's server.
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-2/+2
|
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-1/+1
|
* 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-271-1/+1
|
* 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-201-3/+19
|\ \ | | | | | | | | | | | | | | | 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-051-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* | | Merge pull request #23869 from oreoshake/to-sentence-html-safetyRafael França2016-04-201-0/+30
|\ \ \ | | | | | | | | Add html_safe support to ActionView Array#OutputSafetyHelper
| * | | mimic ActiveSupport's Array#to_sentence in an html_safe-aware wayNeil Matatall2016-03-151-0/+30
| | | |
* | | | Ensure Cache#inspect doesn't block concurrent cache writesJeremy Daer2016-04-191-0/+4
| |_|/ |/| | | | | | | | | | | | | | | | | 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.
* | | 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-312-0/+8
|/ / | | | | | | | | 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
* | fix a comment in atom_feed_helper.rb白井 健太2016-03-161-1/+1
| |
* | 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
* | 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.
* | 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