Commit Graph

2247 Commits

Author SHA1 Message Date
Akira Matsuda
d2f4541f12 Passing in a Hash instance as non-kwargs parameters has to be curly braced now 2019-09-05 13:26:58 +09:00
Akira Matsuda
4071115ddd Passing in a Hash instance as kwargs parameters requires the "double splat" prefix 2019-09-05 13:26:58 +09:00
sinsoku
7b157f1409
Add doc about I18n support for :placeholder option [ci skip]
The :placeholder option accepts true, so it should be mentioned in the documentation.

Ref: https://github.com/rails/rails/pull/16438
2019-08-28 02:25:41 +09:00
Akira Matsuda
cade89e034 Reduce Hash creation in FormHelper 2019-08-27 04:07:22 +09:00
Akihito Tsukamoto
0a77c05308 Prevent TagBuilder modify options 2019-08-20 00:13:02 +09:00
Akira Matsuda
88fe8d9e7c Stop reopening ClassMethods and merge definitions 2019-08-19 00:35:23 +09:00
Akira Matsuda
2f71297919 :action is just a string 2019-08-19 00:34:28 +09:00
Akira Matsuda
07c50800fb Reduce Array allocations while finding templates 2019-08-19 00:22:42 +09:00
Will Jessop
fdb6a90794
Remove misleading documentation
The docs for ActionView partial renderer state:

> NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects, like Active Records, in there.

The reporter stated:

> I can render a collection of hashes without problems:
>
> = render :partial => "info_row", :collection => my_collection, :as => :d

I tested this in a Rails 6.0 rc2 app and hashes were passed as described. Fixes #36897. [ci skip]
2019-08-10 02:52:15 +01:00
Kasper Timm Hansen
12001611d6
Require and support rails-html-sanitzer 1.2.0
Rails now requires 1.2.0 because it relies on the safe_list_sanitizer
API exclusively.

Also raise `sanitizer_vendor` API from the dead for
rails-deprecated_sanitizer.

Fixes https://github.com/rails/rails-deprecated_sanitizer/pull/6
2019-08-09 00:07:45 +02:00
Cliff Pruitt
265f97f1c1 Update rails-html-sanitizer to 1.1.0 in actionview.gemspec
Commit 52f0b050e2 replaces `white_list_sanitizer` with `safe_list_sanitizer`. This is a breaking change unless the installed version of `rails-html-sanitizer` is `>= 1.1.0`.

This commit updates the minimum version in `actionview/actionview.gemspec` to `1.1.0`.
2019-08-05 13:20:53 -04:00
Kasper Timm Hansen
064b7f6082
Remove unused require 2019-08-05 04:10:54 +02:00
Juanito Fatas
52f0b050e2
Update sanitizer in ActionView::Helpers::SanitizeHelper
- The sanitizer has been changed to safe_list_sanitizer.
- deprecate white_list_sanitizer
2019-08-05 03:35:35 +02:00
Rafael Mendonça França
92cb55ce19
This test needs integer core ext for time 2019-08-02 01:16:50 -04:00
Rafael Mendonça França
4b4bed83e2
Require integer conversion for this test 2019-08-02 00:49:47 -04:00
Rafael Mendonça França
967beb7229
Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now"
This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
2019-08-02 00:24:21 -04:00
Rafael Mendonça França
6384933994
Revert "You give jruby_skip & rubinius_skip a good name"
This reverts commit 8d2866bb80fbe81acb04f5b0c44f152f571fb29f.
2019-08-02 00:24:11 -04:00
Akira Matsuda
8d2866bb80 You give jruby_skip & rubinius_skip a good name
This hack prevails everywhere in the codebase by being copy & pasted, and it's actually not a negative thing but a necessary thing for framework implementors,
so it should better have a name and be a thing.

And with this commit, activesupport/test/abstract_unit.rb now doesn't silently autoload AS::TestCase,
so we're ready to establish clearner environment for running AS tests (probably in later commits)
2019-08-02 05:36:38 +09:00
Akira Matsuda
98d0f7ebd3 MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now
It's used everywhere, clean and mature enough
2019-08-02 05:36:15 +09:00
Ryuta Kamizono
ad957273f5 Fix _write_layout_method 2019-08-02 01:55:47 +09:00
Rafael Mendonça França
d40c88ae05
No private def 2019-08-01 11:18:42 -04:00
Akira Matsuda
d21e5fbc70 These methods doesn't have to be protected 2019-08-01 17:58:00 +09:00
Akira Matsuda
af2129b4c7 Use try only when we're unsure if the receiver would respond_to the method 2019-08-01 17:58:00 +09:00
Ryuta Kamizono
f40eb4a408
Merge pull request #36818 from hc0208/fix_typo_in_data_remote_js
Fix typo submited → submitted
2019-07-31 12:39:08 +09:00
hc0208
6a409f7341 Fix typo submited → submitted [ci skip] 2019-07-31 12:22:21 +09:00
Akira Matsuda
46d207fde4 Avoid creating new Array when looking up already registered detail 2019-07-31 12:18:42 +09:00
Prem Sichanugrist
004f223f33
Merge pull request #36813 from haruyuki97/haruyuki97/fix-comment-in-url-helper
Fix a/an usage on `phone_to` documentation.

[ci skip]
2019-07-30 18:59:31 +09:00
haruyuki97
96e8a817fa fix a typo [ci skip] 2019-07-30 18:49:25 +09:00
Akira Matsuda
0196551e60 Use match? where we don't need MatchData 2019-07-29 14:23:10 +09:00
Akira Matsuda
8f90ac7827 Add AS::TimeZone#match? 2019-07-29 14:17:36 +09:00
Akira Matsuda
62d089a4ad Suppress Ruby warning: ⚠️ non-nil $, will be deprecated 2019-07-29 12:55:28 +09:00
st0012
e289c8d775 Assert query counts in cache relation test
This is to guard the change in #35982
2019-07-28 14:24:47 +08:00
Akira Matsuda
d1ffe59ab5 Use match? where we don't need MatchData
We're already running Performance/RegexpMatch cop, but it seems like the cop is not always =~ justice
2019-07-27 13:06:49 +09:00
Pietro Moro
c285c15820 Change test description with the correct URL name 2019-07-26 21:25:23 +00:00
Rafael França
a0e58e687d
Merge pull request #36178 from sshaw/fix_time_zone_options_priority
Update time_zone_options_for_select docs
2019-07-26 16:03:37 -04:00
Abhay Nikam
b34d7692c1 Change the test description to say the URL helper name in test. 2019-07-27 00:41:28 +05:30
Pietro Moro
0eff6956a5 Added a phone_to helper method, on the style of mail_to and sms_to. (#36775)
* Added a phone_to helper method, on the style of mail_to and sms_to.

It creates an anchor tag with the href set to tel: *here your number*
which, when clicked on a mobile phone, or on a desktop with a supported
application, lets the phone app kick in, and it prepopulates it with the
phone number specified.

[Pietro Moro + Rafael Mendonça França]
2019-07-26 14:54:57 -04:00
Rafael França
1760fe919f
Merge pull request #36764 from willianveiga/feature/inputs-inside-disabled-fieldset-are-not-submited-on-remote-true-forms
Inputs inside disabled fieldset are not submited on remote: true forms
2019-07-26 13:48:18 -04:00
Willian Gustavo Veiga
64631d83c5 Add test for submitted fields within disabled fieldsets 2019-07-26 12:59:23 -03:00
Sharang Dashputre
b00a183aa1 Add a default value for arg format in ActionView::Digestor.digest() 2019-07-26 15:22:43 +05:30
Rafael França
a11a7b2c7b
Merge pull request #35334 from sharang-d/digest-doc-update
Update comment for ActionView::Digestor.digest [ci skip]
2019-07-26 00:01:08 -04:00
Rafael Mendonça França
64f4d7fcb0
Merge pull request #36576 from mtsmfm/mtsmfm/fix-fixture-resolver
Support :any variants for ActionView::FixtureResolver
2019-07-25 22:24:31 -04:00
Rafael Mendonça França
c9b7b9ff8a
Merge pull request #36412 from robotdana/compact_blank
Add compact_blank shortcut for reject(&:blank?)
2019-07-25 16:18:18 -04:00
Willian Gustavo Veiga
c3e786fc48 Issue #36728 - Inputs inside disabled fieldset are not submited on remote: true forms 2019-07-25 16:07:11 -03:00
Rafael França
89ba95b69a
Merge pull request #36467 from spk/add-doc-host-protocol-asset_path
Add documentation on actionview asset_path with host and protocol
2019-07-24 14:14:08 -04:00
Ryuta Kamizono
0e149abbd5 Fix broken rdoc for UrlHelper [ci skip]
* Fix unintentionally linked String, Symbol, Hash, and ERB.
* Fix unintentionally code block.
2019-07-24 12:55:28 +09:00
Carlos Antonio da Silva
876548a7e7 Fix argument in doc sample of new sms_to helper [ci skip] 2019-07-19 18:10:47 -03:00
Guillermo Iguaran
ea91f9bc1c
Merge pull request #36511 from aantix/sms_link_helper
Helper method to create an sms link
2019-07-19 15:36:58 -05:00
Jean Boussier
bd78d3eecf Fix a minor typo in ActionView::UnboundTemplate 2019-07-19 15:18:57 +02:00
Guilherme Mansur
526a5eb10c Empty array instead of nil for source_extract
The source_extract method will return nil when it can't find the file name in
the backtrace, methods that consume this method expect an array and the nil ends
up causing type errors down the road like it happened here: #36341. This
patch refactors the source_extract method so that it returns an empty
array instead of nil when it can't find the source code.

Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>
2019-07-14 15:04:25 -04:00