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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
murajun1978
December 20, 2014
Programming
1
180
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.1k
How to Enjoy the Murajun’s Style
murajun1978
0
92
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
960
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
67
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
180
Nuxt Server Components
wattanx
0
110
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
370
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
150
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
970
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
270
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.1k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
520
Java 21/25 Virtual Threads 소개
debop
0
260
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
85
Building Adaptive Systems
keathley
44
3k
Bash Introduction
62gerente
615
210k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
68
38k
Side Projects
sachag
455
43k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Agile that works and the tools we love
rasmusluckow
331
21k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Thoughts on Productivity
jonyablonski
75
5.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
78
It's Worth the Effort
3n
188
29k
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