Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
940
How to Enjoy the Murajun’s Style
murajun1978
0
72
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
940
tebukuro
murajun1978
0
130
Shinosaka.rb #17 Hands on
murajun1978
0
61
New Features in Rails 4.2
murajun1978
0
930
Other Decks in Programming
See All in Programming
Integrating WordPress and Symfony
alexandresalome
0
130
開発に寄りそう自動テストの実現
goyoki
1
680
GeistFabrik and AI-augmented software development
adewale
PRO
0
280
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
500
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
AWS CDKの推しポイントN選
akihisaikeda
1
240
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
210
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.1k
Microservices rules: What good looks like
cer
PRO
0
860
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.4k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
190
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
RailsConf 2023
tenderlove
30
1.3k
Designing Experiences People Love
moore
143
24k
Producing Creativity
orderedlist
PRO
348
40k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Code Review Best Practice
trishagee
73
19k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Faster Mobile Websites
deanohume
310
31k
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