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
130
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.2k
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
290
Effective Debugging Apps in VS Code
murajun1978
1
880
tebukuro
murajun1978
0
110
Shinosaka.rb #17 Hands on
murajun1978
0
44
New Features in Rails 4.2
murajun1978
0
900
FactoryGirl LT
murajun1978
1
67
Shinosaka.rb #3
murajun1978
0
51
Other Decks in Programming
See All in Programming
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
170
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Open source software: how to live long and go far
gaelvaroquaux
0
640
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
270
WebDriver BiDiとは何なのか
yotahada3
1
140
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
Ruby on cygwin 2025-02
fd0
0
150
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
570
ソフトウェアエンジニアの成長
masuda220
PRO
12
1.7k
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Featured
See All Featured
Bash Introduction
62gerente
611
210k
Navigating Team Friction
lara
183
15k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
BBQ
matthewcrist
87
9.5k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Become a Pro
speakerdeck
PRO
26
5.1k
Typedesign – Prime Four
hannesfritz
40
2.5k
The Invisible Side of Design
smashingmag
299
50k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
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