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
Rails 4: Appetizers
Search
Jesse Wolgamott
July 09, 2013
Programming
1
1k
Rails 4: Appetizers
Features in Rails 4.0 -- presented at @houstonrb
Jesse Wolgamott
July 09, 2013
Tweet
Share
More Decks by Jesse Wolgamott
See All by Jesse Wolgamott
React vs React-Native
jwo
0
140
What is an API
jwo
0
200
DIY Rails Authentication
jwo
0
230
ActionCable - For Not Another Chat App
jwo
3
1.8k
SlackBot.rb - Create You a Slack Bot
jwo
1
1.4k
react-rails: an isomorphic match made in heaven
jwo
0
1.4k
Docker - next big thing
jwo
0
1k
Ruby 2.1 Overview
jwo
0
1k
The Long Ball: Upgrading Rails from 1.2 -> 4.0
jwo
2
210
Other Decks in Programming
See All in Programming
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
270
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
380
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
420
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
180
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
6.9k
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
110
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
440
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
410
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
500
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
110
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
67
First, design no harm
axbom
PRO
2
1.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
What's in a price? How to price your products and services
michaelherold
247
13k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
340
Amusing Abliteration
ianozsvald
0
120
Skip the Path - Find Your Career Trail
mkilby
0
71
Become a Pro
speakerdeck
PRO
31
5.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
210
Transcript
Rails 4: Appetizers @jwo for @houstonrb Wednesday, July 10, 13
Rubies Ruby 1.9.3 at least, prefer 2.0 Rails 2.3 =>
End of Life Ruby 1.8.7 => End of Life Wednesday, July 10, 13
Bootup time faster on Ruby 2.0 with Rails 4 How
fast? Cray Cray Faster Wednesday, July 10, 13
Cache Digests Caches the view (partials) by the updated_at column
Wednesday, July 10, 13
Best if you have a upper-most site object. Example: Basecamp
has an upper-most Account object. Cache Digests Wednesday, July 10, 13
So: Add a Site object that has upper-most updated at.
Cache Digests Wednesday, July 10, 13
Will help with sidebar that does not directly belong to
a Post. Cache Digests Wednesday, July 10, 13
Uses JavaScript to pull only the <body> tag Turbolinks Wednesday,
July 10, 13
Speeds up document based sites Turbolinks Wednesday, July 10, 13
Most everybody should add jquery-turbolinks Turbolinks Wednesday, July 10, 13
Watch out for: Turbolinks Wednesday, July 10, 13
External javascript (stripe) Data tags on the body object things
in the `<head>` like `<script>` tags Tubolinks Wednesday, July 10, 13
Most everything, ever Wednesday, July 10, 13
Moves Mass Assignment protection to the controllers Strong Parameters Wednesday,
July 10, 13
you have to manually remove attr_accessible if upgrading Strong Parameters
Wednesday, July 10, 13
PostgreSQL Additions hstore: JSON store, attributes, better Single Table Inheritance
Wednesday, July 10, 13
PostgreSQL Additions Arrays: tagging, parent child ancestry Wednesday, July 10,
13
Arel Changes find_by_customer_id => lives! find(:all, conditions: ["customer_id = ?",
45]) => DEAD find(customer_id: 45) => new Wednesday, July 10, 13
Arel Changes find_or_create_by_customer_id() => dead find_or_create_by(customer_id: 45) => new! Wednesday,
July 10, 13
Arel Changes where(id: 45).first_or_create => new hotness .all => deprecated
Wednesday, July 10, 13
Scope Changes scope :future, where("created_at > ?", Time.now) => syntax
error Wednesday, July 10, 13
Scope Changes scope :future, → { where("created_at > ?", Time.now)
} Wednesday, July 10, 13
MultiThreaded It's on, baby! Wednesday, July 10, 13
Moved to Gems Observers ActiveRecord SessionStore ActiveResource LOL Action &
Page Caching Wednesday, July 10, 13
Test Directories test/unit => test/models test/functional => test/ controllers Wednesday,
July 10, 13
Misc Gemfile has no Assets section Concerns directory is prevalent
Wednesday, July 10, 13
Misc /bin shows up (binstubs) Plugins must be moved to
lib Wednesday, July 10, 13
Misc ActionController::Live => (not alot of attention) Patch verb in
REST Wednesday, July 10, 13
Misc before_filters are now before_action Wednesday, July 10, 13
Didn't Make it Queue API Async Mailers Wednesday, July 10,
13
get more information http:/ /blog.wyeworks.com/ Rails Conf 2013 Postgres, the
Best Tool You're Already Using Wednesday, July 10, 13
get more information http:/ /rails-upgrade- checklist.com http:/ /upgradingtorails4.com http:/ /upgradingrails.com
Wednesday, July 10, 13
Thanks! I’m @jwo Wednesday, July 10, 13