| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Erubi offers the following advantages for Rails:
* Works with ruby's --enable-frozen-string-literal option
* Has 88% smaller memory footprint
* Does no freedom patching (Erubis adds a method to Kernel)
* Has simpler internals (1 file, <150 lines of code)
* Has an open development model (Erubis doesn't have a
public source control repository or bug tracker)
* Is not dead (Erubis hasn't been updated since 2011)
Erubi is a simplified fork of Erubis that contains just the
parts that are generally needed (which includes the parts
that Rails uses). The only intentional difference in
behavior is that it does not include support for <%=== tags
for debug output. That could be added to the ActionView ERB
handler if it is desired.
The Erubis template handler remains in a deprecated state
so that code that accesses it directly does not break. It
can be removed after Rails 5.1.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
compute_asset_extname should explicitly return nil in else clause
|
| | |
|
|\ \
| | |
| | | |
Fix unexpected behavior of `to_sentence` with $,
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
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.
|
|/ / |
|
| | |
|
|/ |
|
|
|
|
| |
(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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|