| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \
| | | | |
| | | | | |
make `render` work with AC::Params
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In 4.2, since AC::Params inherited `Hash`, processing in the case of
`Hash` was done. But in 5.x, since AC::Params does not inherit `Hash`,
need to add care for AC::Params.
Related to 00285e7cf75c96553719072a27c27e4ab7d25b40
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In #26672 we blocked use of Ruby keywords as identifiers for view
locals but inadvertently broke the use of instance variable names
as identifiers. Whilst not explicitly documented this behavior has
been around for a long time and there's no need to break it now.
Fixes #27480.
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it
|
|/ |
|
|
|
|
| |
(I personally prefer writing one string in one line no matter how long it is, though)
|
| |
|
| |
|
|
|
|
| |
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
|
|\
| |
| | |
Add "check_parameters" option to "current_page?"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Example:
For "http://www.example.com/shop/checkout?order=desc&page=1"
current_page?('http://www.example.com/shop/checkout')
=> true
current_page?(
'http://www.example.com/shop/checkout',
check_parameters: true
)
=> false
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
```
% git grep -n permited
actionview/test/template/url_helper_test.rb:238: def test_button_to_with_permited_strong_params
actionview/test/template/url_helper_test.rb:245: def test_button_to_with_unpermited_strong_params
activerecord/test/cases/relations_test.rb:1620: def test_update_on_relation_passing_active_record_object_is_not_permited
```
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When you ask to generate multiple nested inputs using:
field_for('comments[]', Comment.new) do |c|
c.text_field :body
Rails should generated the names like `post[comments][][body]`.
To make sure we don't have regression the fake models now use the same
implementation of `#to_param` as `ActiveRecord::Base`
Fixes #26942
|
|/
|
|
|
|
| |
When using the hash form of the data option, prevent duplicate
data-disable-with attributes from appearing in the submit tag due to
both string and symbol forms of the hash key being present.
|
|
|
|
|
|
|
|
| |
Per https://www.timeanddate.com/counters/firstnewyear.html, it's already
2017 in a lot of places, so we should bump the Rails license years to
2017.
[ci skip]
|
|\
| |
| | |
do not mutate `object_name` of class in `fields_for`
|
| |
| |
| |
| |
| |
| | |
Since it affects the entire form, should not mutate `object_name` of class.
Fixes #26931
|
| |
| |
| |
| |
| |
| | |
Some methods were added to public API in
5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of
the public API.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Updated the docmentation because "options supports" is not grammatically
correct.
|
|
|
|
| |
Add all the available options, and correct the samples of the
`javascript_include_tag`.
|
|
|
|
| |
Ensure the support works like form_with.
|
| |
|
|
|
|
|
|
|
|
| |
Has the handy effect of making the initial examples in the form_with
docs work too.
Had to do some finagling such that form_with's without a scope didn't
wrap their names in braces ala `[title]`.
|
|
|
|
| |
Remote is gone, long live local.
|
|
|
|
|
|
|
|
|
|
| |
By using `except` any option provided to `form_with` would become an html
attribute unless explicitly opted out. This proved annoying when adding
new internal keys in the options hash and seeing them pop up in the html
output.
Prevent this by inverting the `except` to `slice` out the keys we want to
allow becoming html attributes, like id and class.
|
|
|
|
|
| |
The `delimiter_pattern` option was not present on the documentaion of
the helper.
|
|\
| |
| | |
Avoid invalid attribute on local forms generated by `form_with`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes that the following ERB template would result in invalid HTML
output:
<%= form_with model: Post.new, local: true do |form| %>
<% end %>
Specifically, the resulting form tag would have a spurious `remote`
attribute:
<form remote="false" ...>
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing 67f81cc where we decided not to output ids
by default in the new form helpers.
Went with @dhh's suggestion of just requiring ids on
fields being labelled:
https://github.com/rails/rails/issues/25197#issuecomment-231797117
Seems okay enough.
|
| |
|
|
|
|
| |
Remove `block` keyword from reserved method names
|
|\
| |
| | |
Don't clear digest cache in test environment
|
| |
| |
| |
| | |
It disables recompilation of templates on every request in test env.
|
|/
|
|
|
| |
Removed references to `button` in the `link_to` `disable_with` api
description.
|
|\
| |
| | |
stop using removed `render :text`
|
| |
| |
| |
| | |
Follow up to 79a5ea9eadb4d43b62afacedc0706cbe88c54496
|