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
shinosakarb #11 Rails 4 Pattenrs
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
murajun1978
December 20, 2014
Programming
180
1
Share
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.2k
How to Enjoy the Murajun’s Style
murajun1978
0
96
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
130
Efficient development with GraphQL
murajun1978
0
330
Effective Debugging Apps in VS Code
murajun1978
1
970
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
70
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
Feature Toggle は捨てやすく使おう
gennei
0
570
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
570
10 Tips of AWS ~Gen AI on AWS~
licux
5
330
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
130
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
270
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
580
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
150
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
190
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
160
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
870
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.3k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Claude Code のすすめ
schroneko
67
220k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Exploring anti-patterns in Rails
aemeredith
3
320
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
93
Balancing Empowerment & Direction
lara
6
1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Context Engineering - Making Every Token Count
addyosmani
9
820
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
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