| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
the `asset_host` proc returning nil
|
|
|
|
|
|
| |
Just so it's clearer what's going on in the following assertion.
/cc #11993 @robin850
|
|\
| |
| | |
Use NameError#name to assert raised error.
|
| |
| |
| |
| |
| | |
This makes the test compatible with other Ruby implementations, which
may implement error messages differently.
|
| |
| |
| |
| | |
(This is a manual merge of #9102)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
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 tag helper, honor html_safe on arrays; also make safe_join more similar to Array.join
|
| | |
| | |
| | |
| | | |
similar to Array.join by first calling flatten.
|
|/ / |
|
| |
| |
| |
| | |
reviewed: @tenderlove
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
: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"
|
|\ \
| | |
| | |
| | | |
Allow custom asset host to be passed in asset_url
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Dup options hash to prevent modifications
|
| |/ /
| | |
| | |
| | | |
`options[:default]` and `options[:raise]` can be mistakenly added to the `options` hash. This can be a problem if you're reusing the same object.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, only the object and method name from the label tag were
used when looking up the translation for a label. If a value is
given for the label, this ought to be additionally used. The
following:
# form.html.erb
<%= form_for @post do |f| %>
<%= f.label :type, value: "long" %>
<% end %>
# en.yml
en:
activerecord:
attributes:
post/long: "Long-form Post"
Used to simply return "long", but now it will return "Long-form
Post".
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Change favicon_link_tag helper mimetype from image/vnd.microsoft.icon to image/x-icon.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
image/x-icon.
Although the official IANA-registered MIME type for ICO files is image/vnd.microsoft.icon,
registered in 2003, it was submitted to IANA by a third party and is not recognized by Microsoft products.
The MIME type image/x-icon should be used since is the one recognized by the major browsers on the market.
|
|/ / |
|
| |
| |
| |
| | |
Related with cbb917455f306cf5818644b162f22be09f77d4b2
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Remove wrapping div with inline styles for hidden form fields.
Conflicts:
actionview/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | | |
We are dropping HTML 4.01 and XHTML strict compliance since input
tags directly inside a form are valid HTML5, and the absense of
inline styles help in validating for Content Security Policy.
|
| | | |
|
|/ /
| |
| |
| | |
closes #14147
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
with_css_classes: true option overwrites other html classes.
Concatenate day month and year classes rather than overwriting.
|
| |
| |
| |
| | |
variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
|
| |
| |
| |
| |
| |
| |
| | |
Closes #14405.
This is a follow-up to 9e997e9039435617b6a844158f5437e97f6bc107 to restore
the documented behavior.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
add include_hidden option to collection_check_boxes helper
Conflicts:
actionview/CHANGELOG.md
actionview/test/template/form_collections_helper_test.rb
|
| | | |
|