skip to main
|
skip to sidebar
Cutting Edge Meltdown
Rainbow road addict
Tuesday, August 4, 2009
How to validate money amount in ActiveRecord?
This is how I validate money amount in Romey.
Basically an regex that allows up to 2 decimal points or whole integers.
validates_format_of :amount, :with => /^\d+$|^\d+\.\d\d?$/
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
shenie
View my complete profile
Blog Archive
►
2010
(1)
►
July
(1)
Overwrite Inploy app servers' restart command
▼
2009
(17)
►
December
(1)
My shortcut to open any gem in TextMate with 1 com...
►
November
(2)
Download sources jar from maven
ImageMagick and JPEG on OSX
►
September
(1)
Mass erb to haml conversion
▼
August
(6)
How to stop unix read command escape backslashes
Software design or code design
Rails Rumble after thoughts
Using google_ajax_library when offline.
How to use WinMerge as ClearCase compare & merge t...
How to validate money amount in ActiveRecord?
►
April
(1)
How I installed ruby and run RoR on QNAP TS-219
►
February
(1)
How do I automatically revert to local javascript ...
►
January
(5)
How to remove windows carriage return (^M) on Mac
Use ActiveRecord migration to manage database chan...
How to do mass renaming of file extension
Easy way to backup codebase on USB key with git
Use jruby to dump DB schema to ruby
►
2007
(3)
►
September
(2)
How to copy gems to a different ruby installation
What blogging app should I user?
►
February
(1)
Muhahahaha I'm back
Labels
architecture
(1)
database
(1)
gem
(2)
git
(1)
haml
(1)
jruby
(2)
nas
(1)
qnap
(1)
rails
(3)
ruby
(5)
scripting
(2)
shell
(2)
tips
(1)
Subscribe To
Posts
Atom
Posts
Comments
Atom
Comments
0 comments:
Post a Comment