| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This makes sure that the labels are linked up with the fields.
Fixes #29014
|
|
|
|
| |
st0012/fix-partial-cache-logging
|
|
|
|
| |
boolean.
|
|
|
|
|
| |
form_with requires people to pass an id manually, so users can just
prefix their namespace right there.
|
| |
|
|\
| |
| | |
Remove requirement on mathn
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test using mathn was first introduced in f1d9179 to check that the
`distance_of_time_in_words` properly doesn't use the `Fixnum#/` method
by explicitly requiring this library as it redefines this method.
Given that `mathn` has been gemified in Ruby 2.5 and is deprecated since
version 2.2, we can certainly safely assume that people will most-likely
not require this library in their application.
However, to make sure that we don't regress, let's add a test similar to
the one before f1d9179.
|
|\ \
| | |
| | | |
Define path with __dir__
|
| |/
| |
| |
| |
| |
| | |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|\ \
| |/
|/| |
Fix select tag helper used with Enumerable choices
|
| |
| |
| |
| |
| |
| | |
Allows a custom object implementing Enumerable to be used as the choices
parameter for a select tag, which previously wasn't possible due to the
call to `empty?` on the choices (which isn't implemented on Enumerable).
|
| |
| |
| |
| |
| | |
This allows auto_discovery_link_tag to support the JSON Feed standard.
See https://jsonfeed.org/version/1 for more information.
|
| |
| |
| |
| | |
see: https://bugs.ruby-lang.org/issues/6696
|
|/ |
|
| |
|
|\
| |
| | |
Add tests for rendering with variants
|
| | |
|
|\ \
| | |
| | | |
Ensure input to distance_of_time_in_words is not nil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Internally all input is converted to time so that it can be treated
uniformly.
Remove now-unneeded condition
* Now that all input is treated is converted to time, we no longer need
to type check it.
Rename variables to clarify their purpose
Extract private method to normalize distance_of_time args to time
Update actionview changelog
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
kyuden/remove_unnecessary_attributes_of_select_in_form_with
Remove unnecessary `skip_default_ids` and `allow_method_names_outside_object` attributes of select tag in `form_with`
|
| |/ /
| | |
| | |
| | | |
`allow_method_names_outside_object` attributes of select tag in `form_with`
|
|\ \ \
| | | |
| | | | |
`sort_query_string_params` method is no more used
|
| |/ /
| | |
| | |
| | |
| | | |
- This method was added in this commit https://github.com/rails/rails/commit/33258d713a4bc20b71e92fd656c923a7b189cd33
- The last caller got removed there https://github.com/rails/rails/commit/0b6ce3422370647cad3e91263a291f69b313d65b
|
|/ /
| |
| |
| |
| |
| | |
- `check_parameters` kwargs was added to the `current_page?` method, the implementation was assuming only hashes responds to `delete`. This was causing issues when `current_page?` was called with a Active Model object
- ref https://github.com/rails/rails/pull/27549
- Fixes #28846
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This configuration is not present in ActionView::Base so we can't let
the action_view.set_configs initializer set it.
Also add tests to make sure this config works.
Fixes #28824
|
| |
| |
| |
| |
| | |
Closes #28382
Closes #28651
|
|/
|
|
|
| |
Since this protection is now in Parameters we can use it instead of
reimplementing again.
|
|
|
|
|
|
| |
-
Restore ability to accept ecmascript
JS response should not modify DOM.
|
| |
|
|
|
| |
The previously referenced file no longer appears to exist in the project.
|
|\
| |
| | |
Prevent ujs event propagation if element disabled when event chain begins
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The existing UJS event behavior relies on browsers not sending events for
various events when an element is disabled. For example, imagine the following:
<button type="submit" disabled="disabled">Click me</button>
The above button is disabled, so browsers will not trigger a click event and
all UJS behavior is prevented. However, imagine a button like this:
<button type="submit" disabled="disabled"><strong>Click me</strong></button>
The above is treated differently by browsers such as Chrome/Safari. These
browsers do not consider the strong tag to be disabled, and will trigger click
events. UJS has logic to walk up the DOM to find an associated element subject
to UJS behavior. But, this logic does not take into account the disabled
status of the element.
I originally thought we could simply change the selectors used to match
elements to ignore disabled elements. However, UJS disables some elements as
part of the event chain. So, an element might match early in the chain and
then fail to match later. Instead of changing the selectors I added a callback
to the chain that calls `stopEverything` if an element is disabled when the
event chain begins.
|
| |
| |
| |
| |
| | |
`'#{name}' file doesn't exist, so no dependencies` was removed in
bb04814.
|
|/
|
|
|
|
|
| |
Action View overrides `url_for` in the view context to render paths by
default when using `url_for` and this means that direct route helpers
don't get the full url when called with the url suffix. To fix this
always call the original `url_for`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently `ActiveSupport::Duration` implicitly converts to a seconds
value when used in a calculation except for the explicit examples of
addition and subtraction where the duration is the receiver, e.g:
>> 2 * 1.day
=> 172800
This results in lots of confusion especially when using durations
with dates because adding/subtracting a value from a date treats
integers as a day and not a second, e.g:
>> Date.today
=> Wed, 01 Mar 2017
>> Date.today + 2 * 1.day
=> Mon, 10 Apr 2490
To fix this we're implementing `coerce` so that we can provide a
deprecation warning with the intent of removing the implicit coercion
in Rails 5.2, e.g:
>> 2 * 1.day
DEPRECATION WARNING: Implicit coercion of ActiveSupport::Duration
to a Numeric is deprecated and will raise a TypeError in Rails 5.2.
=> 172800
In Rails 5.2 it will raise `TypeError`, e.g:
>> 2 * 1.day
TypeError: ActiveSupport::Duration can't be coerced into Integer
This is the same behavior as with other types in Ruby, e.g:
>> 2 * "foo"
TypeError: String can't be coerced into Integer
>> "foo" * 2
=> "foofoo"
As part of this deprecation add `*` and `/` methods to `AS::Duration`
so that calculations that keep the duration as the receiver work
correctly whether the final receiver is a `Date` or `Time`, e.g:
>> Date.today
=> Wed, 01 Mar 2017
>> Date.today + 1.day * 2
=> Fri, 03 Mar 2017
Fixes #27457.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The assertion will ensure that the behavior doesn't regress.
assert_equal "/projects", polymorphic_path("projects")
Remove FIXME related to polymorphic_url behavior.
polymorphic_url with Symbol or String works equally.
Example:
default_url_options[:host] = "example.com"
polymorphic_url(:projects) # => "http://example.com/projects"
polymorphic_url("projects") # => "http://example.com/projects"
Related to 37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e
|
|
|
|
| |
empty lines
|
|\
| |
| | |
Get TODO done in `render_test`
|
| | |
|
|/
|
|
|
|
|
| |
```
go get -u github.com/client9/misspell/cmd/misspell
misspell -w -error -source=text .
```
|
| |
|
|
|
|
|
| |
sub_template_message distracts Rails.root from its message only when Rails.root is defined,
and Rails.root is defined at tools/test.rb
|
|
|
|
| |
This causes TypeError when loaded separately
|
| |
|
|\
| |
| | |
Fix missing partial iteration
|
| |\ |
|