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
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
1.2k
dotfiles 式年遷宮 令和最新版
masawada
1
690
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
480
React Native New Architecture 移行実践報告
taminif
1
140
Integrating WordPress and Symfony
alexandresalome
0
130
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.7k
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.1k
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
110
FluorTracer / RayTracingCamp11
kugimasa
0
200
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
200
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Writing Fast Ruby
sferik
630
62k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Embracing the Ebb and Flow
colly
88
4.9k
Statistics for Hackers
jakevdp
799
230k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Scaling GitHub
holman
464
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.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