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
murajun1978
December 20, 2014
Programming
180
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.3k
How to Enjoy the Murajun’s Style
murajun1978
0
100
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
140
Efficient development with GraphQL
murajun1978
0
330
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
72
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.1k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
7
4.4k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
670
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
Creating Composable Callables in Contemporary C++
rollbear
0
130
JavaDoc 再入門
nagise
1
340
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
230
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Un-Boring Meetings
codingconduct
0
310
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Building Adaptive Systems
keathley
44
3.1k
Color Theory Basics | Prateek | Gurzu
gurzu
0
360
Site-Speed That Sticks
csswizardry
13
1.2k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
190
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Mind Mapping
helmedeiros
PRO
1
250
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