Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
shinosakarb #11 Rails 4 Pattenrs
Search
murajun1978
December 20, 2014
Programming
1
170
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
970
How to Enjoy the Murajun’s Style
murajun1978
0
75
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
120
Efficient development with GraphQL
murajun1978
0
320
Effective Debugging Apps in VS Code
murajun1978
1
940
tebukuro
murajun1978
0
130
Shinosaka.rb #17 Hands on
murajun1978
0
62
New Features in Rails 4.2
murajun1978
0
940
Other Decks in Programming
See All in Programming
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
120
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
認証・認可の基本を学ぼう後編
kouyuume
0
250
Graviton と Nitro と私
maroon1st
0
130
Cap'n Webについて
yusukebe
0
150
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
420
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
120
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
260
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
270
JETLS.jl ─ A New Language Server for Julia
abap34
2
450
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
13k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
29
Designing for Performance
lara
610
69k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
410
sira's awesome portfolio website redesign presentation
elsirapls
0
89
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
340
The Pragmatic Product Professional
lauravandoore
37
7.1k
Navigating Weather and Climate Data
rabernat
0
52
Automating Front-end Workflow
addyosmani
1371
200k
The Spectacular Lies of Maps
axbom
PRO
1
400
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
92
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