Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Dinero en Ruby
Search
fedesoria
July 17, 2015
Programming
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dinero en Ruby
3 tips de como manejar dinero en tus proyectos de Ruby
fedesoria
July 17, 2015
More Decks by fedesoria
See All by fedesoria
Mo Money Mo Problems (with ruby)
fedesoria
0
400
Bigotes en mis Vistas
fedesoria
0
83
AB Testing
fedesoria
0
69
Other Decks in Programming
See All in Programming
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
カツオ、ご期待ください
suneo3476
0
190
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Event is what happens
moro
2
770
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The Curious Case for Waylosing
cassininazir
1
570
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Embracing the Ebb and Flow
colly
88
5.2k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
New Earth Scene 8
popppiees
4
2.7k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
GitHub's CSS Performance
jonrohan
1033
470k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
> puts ‘$’ @fedesoria
1. ¿Cómo guardar dinero en la base de datos?
139.25 + 74.79
=> 214.04
=> 214.04000000000002
1/3 != 1010101
Integer > production.precio => 2000 # 20.00
BigDecimal
2. ¿Cómo hago redondeo?
$20.005
Redondeo al número entero IEEE Standard 1985
$20.005 => $20.00
$20.015 => $20.02
BigDecimal ROUND_HALF_EVEN
3. ¿Cómo manejo múltiples monedas?
gem install money
Money.new(1000, "USD")
Money.new(1000, “USD”).to_s => “$10.00”
Money.new(1000, “USD”). exchange_to( “MXN”) => “$200.00”
> puts ‘Gracias’ @fedesoria