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
1
160
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
910
How to Enjoy the Murajun’s Style
murajun1978
0
69
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.4k
Zeitwerk integration in Rails 6.0
murajun1978
0
120
Efficient development with GraphQL
murajun1978
0
310
Effective Debugging Apps in VS Code
murajun1978
1
930
tebukuro
murajun1978
0
120
Shinosaka.rb #17 Hands on
murajun1978
0
58
New Features in Rails 4.2
murajun1978
0
930
Other Decks in Programming
See All in Programming
Inside of Swift Export
giginet
PRO
1
560
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
110
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
420
CSC509 Lecture 11
javiergs
PRO
0
310
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
410
What's New in Web AI?
christianliebel
PRO
0
130
Vueで学ぶデータ構造入門 リンクリストとキューでリアクティビティを捉える / Vue Data Structures: Linked Lists and Queues for Reactivity
konkarin
1
290
2025 컴포즈 마법사
jisungbin
0
120
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
150
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
37
12k
Private APIの呼び出し方
kishikawakatsumi
3
880
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
160
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Statistics for Hackers
jakevdp
799
220k
The Pragmatic Product Professional
lauravandoore
36
7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
RailsConf 2023
tenderlove
30
1.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
930
Designing for humans not robots
tammielis
254
26k
Facilitating Awesome Meetings
lara
57
6.6k
Building an army of robots
kneath
306
46k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
320
Optimizing for Happiness
mojombo
379
70k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
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