aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
Commit message (Collapse)AuthorAgeFilesLines
...
* | Revert "Merge pull request #17973 from maurogeorge/file_field_hidden_field"eileencodes2016-06-213-53/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-213-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add test for nested html dependencies with same logical name as templates ↵Javan Makhmali2016-06-151-2/+6
| | | | | | | | for other formats
* | Move and rename testJavan Makhmali2016-06-151-7/+7
| |
* | Fix finding templates for digesting for */* requests that render a ↵Javan Makhmali2016-06-154-3/+30
| | | | | | | | non-default (html) template
* | Explicity find with the rendered format to handle searching multiple view ↵Javan Makhmali2016-06-153-4/+2
| | | | | | | | paths correctly
* | Fix digesting templates with identical logical names when requesting a ↵Javan Makhmali2016-06-153-4/+18
| | | | | | | | 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.
* | Merge pull request #25079 from jeffkreeftmeijer/send_file-halts-request-cycleSean Griffin2016-06-071-5/+0
|\ \ | | | | | | | | | Use `#performed?` to terminate controller callbacks
| * | Delete bad testSean Griffin2016-06-071-5/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | This test was broken by f650e0324207e46ed5240380e60bdf1e2a5023a6. It was added by https://github.com/rails/rails/pull/17978, and is adequately tested elsewhere. The reason that this breaks is that `Controller#process` is not going to set a new response object, and we now terminate in callbacks if the response has been sent. The only reason that this test was calling `get` in the first place was because the controller under test blows up if `request` was `nil`. The point being that the failure is invalid, and I don't think we need to fix the test in this location.
* / Fix a typo in `time_field` [ci skip]Jake Worth2016-06-051-1/+1
|/
* Fix debug helper testRyuta Kamizono2016-06-031-1/+4
|
* Remove package:clean taskJavan Makhmali2016-05-241-1/+0
| | | | Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
* Remove space, properly italicizeJon Moss2016-05-211-5/+5
| | | | | | Difference in rendering --> https://gist.github.com/maclover7/a50ff9231eb825c39c77cd5858af6d9a [ci skip]
* Confirm with the specification when generating emtpy option for select with ↵Vipul A M2016-05-213-6/+25
| | | | | | | | | | | | `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
* Add more test coverage to layoutsRafael Mendonça França2016-05-201-4/+152
| | | | [Rafael Mendonça França + Nick Sutterer + thedarkone]
* 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 :).
* | Support for unified Integer class in Ruby 2.4+Jeremy Daer2016-05-181-1/+1
| | | | | | | | | | | | | | | | Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer.
* | `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-173-3/+39
| | | | | | | | | | | | 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.
* | locals can be accessed from templates rendered in the controllerAaron Patterson2016-05-171-0/+16
|/
* 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-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.