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
780
How to Enjoy the Murajun’s Style
murajun1978
0
62
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.4k
Zeitwerk integration in Rails 6.0
murajun1978
0
110
Efficient development with GraphQL
murajun1978
0
310
Effective Debugging Apps in VS Code
murajun1978
1
910
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
機能追加とリーダー業務の類似性
rinchoku
2
1k
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
110
ProxyによるWindow間RPC機構の構築
syumai
3
1k
Swift Updates - Learn Languages 2025
koher
2
450
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
410
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
240
為你自己學 Python - 冷知識篇
eddie
1
340
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
180
rage against annotate_predecessor
junk0612
0
160
OSS開発者という働き方
andpad
5
1.7k
Rancher と Terraform
fufuhu
2
200
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
270
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Faster Mobile Websites
deanohume
309
31k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Code Review Best Practice
trishagee
70
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
A better future with KSS
kneath
239
17k
Building Applications with DynamoDB
mza
96
6.6k
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