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
890
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
100
What is an API
jwo
0
180
DIY Rails Authentication
jwo
0
180
ActionCable - For Not Another Chat App
jwo
3
1.4k
SlackBot.rb - Create You a Slack Bot
jwo
1
1.3k
react-rails: an isomorphic match made in heaven
jwo
0
1.2k
Docker - next big thing
jwo
0
870
Ruby 2.1 Overview
jwo
0
880
The Long Ball: Upgrading Rails from 1.2 -> 4.0
jwo
2
190
Other Decks in Programming
See All in Programming
Amazon Nova Reelの可能性
hideg
0
180
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
functionalなアプローチで動的要素を排除する
ryopeko
1
190
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
ErdMap: Thinking about a map for Rails applications
makicamel
1
510
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
140
Rubyでつくるパケットキャプチャツール
ydah
0
160
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
380
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
200
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
5.9k
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
440
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Invisible Side of Design
smashingmag
299
50k
Practical Orchestrator
shlominoach
186
10k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Writing Fast Ruby
sferik
628
61k
Designing Experiences People Love
moore
139
23k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Mobile First: as difficult as doing things right
swwweet
222
9k
A better future with KSS
kneath
238
17k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
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