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
1
110
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.1k
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
280
Effective Debugging Apps in VS Code
murajun1978
1
860
tebukuro
murajun1978
0
110
Shinosaka.rb #17 Hands on
murajun1978
0
43
New Features in Rails 4.2
murajun1978
0
890
FactoryGirl LT
murajun1978
1
66
Shinosaka.rb #3
murajun1978
0
51
Other Decks in Programming
See All in Programming
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
CSC509 Lecture 11
javiergs
PRO
0
180
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
as(型アサーション)を書く前にできること
marokanatani
10
2.6k
Amazon Qを使ってIaCを触ろう!
maruto
0
400
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Jakarta EE meets AI
ivargrimstad
0
610
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
受け取る人から提供する人になるということ
little_rubyist
0
230
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
100
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
How GitHub (no longer) Works
holman
310
140k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
The Pragmatic Product Professional
lauravandoore
31
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
For a Future-Friendly Web
brad_frost
175
9.4k
Become a Pro
speakerdeck
PRO
25
5k
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