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
shinosakarb #11 Rails 4 Pattenrs
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
murajun1978
December 20, 2014
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.5k
How to Enjoy the Murajun’s Style
murajun1978
0
120
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.6k
Zeitwerk integration in Rails 6.0
murajun1978
0
160
Efficient development with GraphQL
murajun1978
0
350
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
160
Shinosaka.rb #17 Hands on
murajun1978
0
87
New Features in Rails 4.2
murajun1978
0
990
Other Decks in Programming
See All in Programming
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
300
Railsバージョンを4倍にした話
optim
0
530
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.8k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
Jetpack Compose Mechanisms
skydoves
3
860
R8 の設定見直しでアプリサイズ削減
andpad
0
220
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
110
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
450
🇪🇸 React Alicante 2026 (Workshop)
ythecombinator
PRO
0
100
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
190
AWSに止められる覚悟してますか?
morizo_1984
2
540
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
520
Featured
See All Featured
Visualization
eitanlees
153
17k
How GitHub (no longer) Works
holman
316
150k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Statistics for Hackers
jakevdp
799
230k
Side Projects
sachag
456
43k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Building an army of robots
kneath
307
47k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
So, you think you're a good person
axbom
PRO
2
2.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
GraphQLとの向き合い方2022年版
quramy
50
15k
Transcript
Rails 4 Patterns Shinosaka.rb #11
me @murajun1978
Rails 4.2.0 has been released!
new goodies ActionMailer #deliver_later Active Job Web Console Good! Adequate
Record
Agenda • ActiveRecord::Callbacks • Scope • ActiveSupport::Concern • Decorator •
ActiveDecorator vs Draper • Helper
Fat Controller
Fat Controller
ActiveRecord::Callbacks
Scope NoMethodError!!
Scope
Scope
Fat Model
ActiveSupport::Concern app/models/concerns/… Class method duplicate :(
Decorator ActiveDecorator view logic… :( $ rails g decorator Post
app/decorators/…
Decorator Which do you like? ActiveDecorator Draper https://github.com/drapergem/draper https://github.com/amatsuda/active_decorator
Helper content_tag_for <tr id="post_123" class=“post ..”>…</tr> http://localhost/posts#post_123