Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
shinosakarb #11 Rails 4 Pattenrs
Search
murajun1978
December 20, 2014
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.5k
How to Enjoy the Murajun’s Style
murajun1978
0
120
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.6k
Zeitwerk integration in Rails 6.0
murajun1978
0
160
Efficient development with GraphQL
murajun1978
0
340
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
160
Shinosaka.rb #17 Hands on
murajun1978
0
85
New Features in Rails 4.2
murajun1978
0
990
Other Decks in Programming
See All in Programming
ChromeでローカルLLM
ryu1013
0
110
パーソナライズPodcastを作った話
repunit11
0
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
990
気持ちぃ〜角丸 Squircle
ryu1013
0
280
mrbgem 三角測量 開発
ogom
0
240
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
210
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
ジョジョの世界をXRで再現する
mofurune
0
150
The Rails Doctrine Decade
koic
2
560
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
730
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Writing Fast Ruby
sferik
630
63k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Between Models and Reality
mayunak
4
490
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
WCS-LA-2024
lcolladotor
0
880
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
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