mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Prefer normal method call over method_missing
This commit is contained in:
parent
ef4bf83a1b
commit
aa756a4c44
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ module ActiveSupport #:nodoc:
|
|||
#
|
||||
# 'こんにちは'.mb_chars.limit(7).to_s # => "こん"
|
||||
def limit(limit)
|
||||
truncate_bytes(limit, omission: nil)
|
||||
chars(@wrapped_string.truncate_bytes(limit, omission: nil))
|
||||
end
|
||||
|
||||
# Capitalizes the first letter of every word, when possible.
|
||||
|
|
Loading…
Reference in a new issue