Skip to content
This repository
Browse code

copy edits

  • Loading branch information...
commit 4b2b595992821688615b4771bf1939b5186815e8 1 parent 00a27c5
Vijay Dev vijaydev authored

Showing 1 changed file with 7 additions and 10 deletions. Show diff stats Hide diff stats

  1. +7 10 actionpack/lib/action_view/helpers/number_helper.rb
17 actionpack/lib/action_view/helpers/number_helper.rb
@@ -39,8 +39,7 @@ def initialize(number)
39 39 # * <tt>:extension</tt> - Specifies an extension to add to the end of the
40 40 # generated number.
41 41 # * <tt>:country_code</tt> - Sets the country code for the phone number.
42   - # * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
43   - # number is given.
  42 + # * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
44 43 #
45 44 # ==== Examples
46 45 #
@@ -53,7 +52,7 @@ def initialize(number)
53 52 # number_to_phone(1235551234, :country_code => 1) # => +1-123-555-1234
54 53 # number_to_phone("123a456") # => 123a456
55 54 #
56   - # number_to_phone("1234a567", :raise => true) # => raise InvalidNumberError
  55 + # number_to_phone("1234a567", :raise => true) # => InvalidNumberError
57 56 #
58 57 # number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".")
59 58 # # => +1.123.555.1234 x 1343
@@ -104,8 +103,7 @@ def number_to_phone(number, options = {})
104 103 # an hyphen to the formatted number given by <tt>:format</tt>).
105 104 # Accepts the same fields than <tt>:format</tt>, except
106 105 # <tt>%n</tt> is here the absolute value of the number.
107   - # * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
108   - # number is given.
  106 + # * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
109 107 #
110 108 # ==== Examples
111 109 #
@@ -115,7 +113,7 @@ def number_to_phone(number, options = {})
115 113 # number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,51 €
116 114 # number_to_currency("123a456") # => $123a456
117 115 #
118   - # number_to_currency("123a456", :raise => true) # => raise InvalidNumberError
  116 + # number_to_currency("123a456", :raise => true) # => InvalidNumberError
119 117 #
120 118 # number_to_currency(-1234567890.50, :negative_format => "(%u%n)")
121 119 # # => ($1,234,567,890.50)
@@ -171,8 +169,7 @@ def number_to_currency(number, options = {})
171 169 # * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to "").
172 170 # * <tt>:strip_insignificant_zeros</tt> - If +true+ removes insignificant zeros after the decimal separator
173 171 # (defaults to +false+).
174   - # * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid
175   - # number is given.
  172 + # * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
176 173 #
177 174 # ==== Examples
178 175 #
@@ -184,7 +181,7 @@ def number_to_currency(number, options = {})
184 181 # number_to_percentage(1000, :locale => :fr) # => 1 000,000%
185 182 # number_to_percentage("98a") # => 98a%
186 183 #
187   - # number_to_percentage("98a", :raise => true) # => raise InvalidNumberError
  184 + # number_to_percentage("98a", :raise => true) # => InvalidNumberError
188 185 def number_to_percentage(number, options = {})
189 186 return unless number
190 187
@@ -215,7 +212,7 @@ def number_to_percentage(number, options = {})
215 212 # * <tt>:locale</tt> - Sets the locale to be used for formatting (defaults to current locale).
216 213 # * <tt>:delimiter</tt> - Sets the thousands delimiter (defaults to ",").
217 214 # * <tt>:separator</tt> - Sets the separator between the fractional and integer digits (defaults to ".").
218   - # * <tt>:raise</tt> - If +true+ InvalidNumberError is raised when an invalid. number is given.
  215 + # * <tt>:raise</tt> - If true, raises +InvalidNumberError+ when the argument is invalid.
219 216 #
220 217 # ==== Examples
221 218 #

0 comments on commit 4b2b595

Please sign in to comment.
Something went wrong with that request. Please try again.