- 03 7月, 2014 1 次提交
-
-
由 John F. Douthat 提交于
(This is a manual merge of #9102)
-
- 01 7月, 2014 1 次提交
-
-
由 Todd Bealmear 提交于
-
- 25 6月, 2014 1 次提交
-
-
由 Gareth Rees 提交于
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
-
- 20 6月, 2014 3 次提交
-
-
由 Lucas Mazza 提交于
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>'
-
由 Jan Szumiec 提交于
-
由 Jan Szumiec 提交于
-
- 15 6月, 2014 1 次提交
-
-
由 Kuldeep Aggarwal 提交于
fix build- see https://travis-ci.org/rails/rails/jobs/27578159#L2913.
-
- 14 6月, 2014 5 次提交
-
-
由 Aditya Kapoor 提交于
-
由 Zuhao Wan 提交于
-
由 Zuhao Wan 提交于
-
由 Zuhao Wan 提交于
-
由 Zuhao Wan 提交于
-
- 13 6月, 2014 1 次提交
-
-
由 Paul Grayson 提交于
In tag helper, honor html_safe on array parameters; also make safe_join more similar to Array.join by first calling flatten.
-
- 12 6月, 2014 1 次提交
-
-
由 Zuhao Wan 提交于
-
- 05 6月, 2014 1 次提交
-
-
由 Ryan Davis 提交于
reviewed: @tenderlove
-
- 01 6月, 2014 1 次提交
-
-
由 Juanjo Bazán 提交于
: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"
-
- 15 5月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 14 5月, 2014 1 次提交
-
-
由 azul 提交于
-
- 13 5月, 2014 8 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Josep Jaume Rey 提交于
`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.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Nick Sutterer 提交于
rename ::_local_prefixes to ::local_prefixes to state the public attribute. document the latter. make ::local_prefixes private, test overriding it and remove documentation for overriding ::_parent_prefixes.
-
- 12 5月, 2014 1 次提交
-
-
由 Guo Xiang Tan 提交于
-
- 09 5月, 2014 5 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 08 5月, 2014 3 次提交
-
-
由 Hubert Łępicki 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 07 5月, 2014 5 次提交
-
-
由 Aaron Patterson 提交于
o_O
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Joshua Cody 提交于
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".
-
由 Arthur Neves 提交于
-