README.md in phony_rails-0.1.12 vs README.md in phony_rails-0.2.0

- old
+ new

@@ -74,10 +74,22 @@ ### Display / Views In your views use: - <%= "some number string variable".phony_formatted(:format => :international, :spaces => '-') %> + <%= "311012341234".phony_formatted(:format => :international, :spaces => '-') %> + <%= "+31-10-12341234".phony_formatted(:format => :international, :spaces => '-') %> + <%= "+31(0)1012341234".phony_formatted(:format => :international, :spaces => '-') %> + +To first normalize the String to a certain country use: + + <%= "010-12341234".phony_formatted(normalize => :NL, :format => :international, :spaces => '-') %> + +You can also use the bang method (phony_formatted!): + + number = "010-12341234" + number.phony_formatted!(normalize => :NL, :format => :international) + number # => "+31 10 12341234" ### Find by normalized number Say you want to find a record by a phone number. Best is to normalize user input and compare to an attribute stored in the db. \ No newline at end of file