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
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
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
990
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
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
270
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.2k
OSもどきOS
arkw
0
180
3Dシーンの圧縮
fadis
1
360
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
130
Moments When Things Go Wrong
aurimas
3
120
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
180
AI時代になぜ書くのか
mutsumix
0
460
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
320
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
0
220
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
200
Oxlintのカスタムルールの現況
syumai
3
240
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
310
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Building Adaptive Systems
keathley
44
3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
560
KATA
mclloyd
PRO
35
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
The Limits of Empathy - UXLibs8
cassininazir
1
340
Are puppies a ranking factor?
jonoalderson
1
3.4k
How to make the Groovebox
asonas
2
2.2k
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