Plugins - Comma Parser
Add to favoritesThis plugin allows you to accept commas from users for integer fields in an ActiveRecord model.
Example
# Table name: cities
# population :integer(11)
class City < ActiveRecord::Base
allow_commas :population
end
Now the user can type population "1,000,000" into a form and it will still save correctly as "1000000" instead of "1". This saves you the hassle of stripping out commas either in JavaScript or in the controller.
http://github.com/dramsay/comma_parser/tree/master
git://github.com/dramsay/comma_parser.git
Rails' (MIT)
Model
