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
170
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
84
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
130
Shinosaka.rb #17 Hands on
murajun1978
0
65
New Features in Rails 4.2
murajun1978
0
950
Other Decks in Programming
See All in Programming
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
180
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
Oxlintはいいぞ
yug1224
5
1.4k
SourceGeneratorのススメ
htkym
0
200
Gemini for developers
meteatamel
0
100
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
130
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
630
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
2026年 エンジニアリング自己学習法
yumechi
0
140
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
The SEO identity crisis: Don't let AI make you average
varn
0
330
Designing for humans not robots
tammielis
254
26k
Become a Pro
speakerdeck
PRO
31
5.8k
We Have a Design System, Now What?
morganepeng
54
8k
What's in a price? How to price your products and services
michaelherold
247
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
A Tale of Four Properties
chriscoyier
162
24k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
190
The untapped power of vector embeddings
frankvandijk
1
1.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
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