Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dinero en Ruby
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
fedesoria
July 17, 2015
Programming
0
57
Dinero en Ruby
3 tips de como manejar dinero en tus proyectos de Ruby
fedesoria
July 17, 2015
Tweet
Share
More Decks by fedesoria
See All by fedesoria
Mo Money Mo Problems (with ruby)
fedesoria
0
400
Bigotes en mis Vistas
fedesoria
0
78
AB Testing
fedesoria
0
65
Other Decks in Programming
See All in Programming
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
600
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
Patterns of Patterns
denyspoltorak
0
1.4k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
400
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
CSC307 Lecture 06
javiergs
PRO
0
680
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
680
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
Featured
See All Featured
A Soul's Torment
seathinner
5
2.2k
What's in a price? How to price your products and services
michaelherold
247
13k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
170
The browser strikes back
jonoalderson
0
360
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
A better future with KSS
kneath
240
18k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Code Review Best Practice
trishagee
74
20k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building Adaptive Systems
keathley
44
2.9k
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