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
180
1
Share
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.2k
How to Enjoy the Murajun’s Style
murajun1978
0
96
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
130
Efficient development with GraphQL
murajun1978
0
330
Effective Debugging Apps in VS Code
murajun1978
1
970
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
70
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
7
1.7k
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
200
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
200
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
520
10 Tips of AWS ~Gen AI on AWS~
licux
5
330
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
340
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.9k
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
490
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.8k
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
190
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
So, you think you're a good person
axbom
PRO
2
2k
HDC tutorial
michielstock
2
620
Bash Introduction
62gerente
615
210k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Abbi's Birthday
coloredviolet
2
6.8k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Speed Design
sergeychernyshev
33
1.6k
Statistics for Hackers
jakevdp
799
230k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Automating Front-end Workflow
addyosmani
1370
200k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
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