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
1
170
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1k
How to Enjoy the Murajun’s Style
murajun1978
0
83
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
320
Effective Debugging Apps in VS Code
murajun1978
1
950
tebukuro
murajun1978
0
130
Shinosaka.rb #17 Hands on
murajun1978
0
64
New Features in Rails 4.2
murajun1978
0
950
Other Decks in Programming
See All in Programming
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
CSC307 Lecture 02
javiergs
PRO
1
780
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
Patterns of Patterns
denyspoltorak
0
1.4k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
Package Management Learnings from Homebrew
mikemcquaid
0
220
Oxlint JS plugins
kazupon
1
890
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
AI & Enginnering
codelynx
0
110
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Code Review Best Practice
trishagee
74
20k
Marketing to machines
jonoalderson
1
4.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Are puppies a ranking factor?
jonoalderson
1
2.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Design in an AI World
tapps
0
140
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Side Projects
sachag
455
43k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Designing Experiences People Love
moore
144
24k
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