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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
murajun1978
December 20, 2014
Programming
190
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
150
Efficient development with GraphQL
murajun1978
0
340
Effective Debugging Apps in VS Code
murajun1978
1
1k
tebukuro
murajun1978
0
150
Shinosaka.rb #17 Hands on
murajun1978
0
74
New Features in Rails 4.2
murajun1978
0
970
Other Decks in Programming
See All in Programming
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
250
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.8k
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
ソフトウェアラスタライザ
fadis
1
500
My Marp Sample
sinoue0108
0
110
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
580
プロポーザルを書いてもらう
pvcresin
0
570
メールのエイリアス機能を履き違えない
isshinfunada
0
250
不幸な GC
chencmd
0
630
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
100
typoなんかねぇよ
raspython3
0
440
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
160
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
900
Color Theory Basics | Prateek | Gurzu
gurzu
0
430
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
300
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
440
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
250
HDC tutorial
michielstock
2
810
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
620
Deep Space Network (abreviated)
tonyrice
0
270
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