| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes #15214
|
|
|
|
|
| |
Since we are using both branches of the code is preferable to use
if/else over the early return.
|
| |
|
| |
|
|
|
| |
Rename `include_seconds_or_options` to `options` to match 6b9356a (which removed the deprecation introduced by #6077). This has no functional impact because the parameter is passed directly through, but makes it clearer that the parameter no longer supports a boolean as input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original implementation has bugs if the regex contains a match group.
Example:
excerpt('This is a beautiful? morning', /\b(beau\w*)\b/i, :radius => 5)
Expected: "...is a beautiful? mor..."
Actual: "...is a beautifulbeaut..."
The original phrase was being converted to a regex and returning the text
either side of the phrase as expected:
'This is a beautiful? morning'.split(/beautiful/i, 2)
# => ["This is a ", "? morning"]
When we have a match with groups the match is returned in the array.
Quoting the ruby docs: "If pattern is a Regexp, str is divided where the
pattern matches. [...] If pattern contains groups, the respective matches will
be returned in the array as well."
'This is a beautiful? morning'.split(/\b(beau\w*)\b/iu, 2)
# => ["This is a ", "beautiful", "? morning"]
If we assume we want to split on the first match – this fix makes that
assumption – we can pass the already assigned `phrase` variable as the place
to split (because we already know that a match exists from line 168).
Originally spotted by Louise Crow (@crowbot) at
https://github.com/mysociety/alaveteli/pull/1557
|
|\
| |
| | |
[ci skip] correct output for asset_helper methods
|
| |
| |
| |
| | |
see cc255d3
|
|\ \
| | |
| | | |
remove unnecessary gsub for space in ActionView::Helpers#debug
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The helper will yield each matched word, and you can use this instead of the
':highlighter' option for more complex replacing logic:
highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) }
# => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Move cleanup into teardown, delete obsolete code.
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | | |
fix build- see https://travis-ci.org/rails/rails/jobs/27578159#L2913.
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | | |
zuhao/refactor_actionview_cleanup_I18n_translations
Clean up I18n stored translations after test.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Avoid hard-coded value in test setup and teardown.
|
| |/ |
|
|/ |
|
|\
| |
| |
| | |
In actionview, eliminate calls to tag that use html_safe parameter values.
|
|/
|
|
| |
This is generally unnecessary, since tag handles string quoting, except in one case (utf8_enforcer_tag) where we want to specify the encoding ourselves.
|
|
|
|
| |
This was also removed from #15542
|
|\
| |
| |
| | |
In tag helper, honor html_safe on arrays; also make safe_join more similar to Array.join
|
| |
| |
| |
| | |
similar to Array.join by first calling flatten.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
zuhao/refactor_actionview_register_template_handler
Add unregister_template_handler to prevent leaks.
Conflicts:
actionview/CHANGELOG.md
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Bring cache_digests:* rake tasks up-to-date with the API changes introduced in
637bb726cac60aaa1f7e482836458aa73e17fbb7
|
|\
| |
| | |
remove rubyforge.org that was shut down [ci skip]
|
| | |
|
| |
| |
| |
| | |
/cc @tenderlove
|
|/ |
|
|\
| |
| | |
Removed CaptureHelper#flush_output_buffer as it is only used in tests.
|
| |
| |
| |
| | |
reviewed: @tenderlove
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
This reverts commit c22a253d1a72602331db1eba3e91bc945eff2346.
Reason: Our documentation assumes the assets are in the proper place and
we are using the default Rails stack.
With the default Rails stack and the assets being in the correct place
the assets helpers uses the `/assets` prefix.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
before this change, we were allocating AS::SafeBuffer objects that were
being interpolated in to a string, so the safe buffer object was being
thrown away. This change only allocates a string (vs a string *and* a
safebuffer) and interpolates the string.
On my test application, this reduced the AS::SafeBuffer objects from
1527k per request to about 500 per request.
|
|\
| |
| | |
Fix AS::NumberHelper results with rationals
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:precision was incorrectly being applied to Rationals
before:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.3"
after:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.33"
|
| |
| |
| |
| | |
the issue tracker. See also #15455 [ci skip]
|
|/ |
|
|
|
|
| |
request parameter might not be supplied [ci skip]
|
| |
|
|\
| |
| | |
Remove unnecessary include for integration tests.
|