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
150
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
840
How to Enjoy the Murajun’s Style
murajun1978
0
64
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
920
tebukuro
murajun1978
0
120
Shinosaka.rb #17 Hands on
murajun1978
0
55
New Features in Rails 4.2
murajun1978
0
930
Other Decks in Programming
See All in Programming
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
350
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
450
Чего вы не знали о строках в Python – Василий Рябов, PythoNN
sobolevn
0
160
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
170
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
330
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
180
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
170
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
開発生産性を上げるための生成AI活用術
starfish719
1
170
Let's Write a Train Tracking Algorithm
twocentstudios
0
220
Model Pollution
hschwentner
1
180
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
190
Featured
See All Featured
Done Done
chrislema
185
16k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Building an army of robots
kneath
306
46k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
2.6k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Speed Design
sergeychernyshev
32
1.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
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