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
770
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
240
Effective Debugging Apps in VS Code
murajun1978
1
820
tebukuro
murajun1978
0
100
Shinosaka.rb #17 Hands on
murajun1978
0
42
New Features in Rails 4.2
murajun1978
0
870
FactoryGirl LT
murajun1978
1
58
Shinosaka.rb #3
murajun1978
0
43
Other Decks in Programming
See All in Programming
ゆるい個人開発のススメ
kuroppe1819
10
930
try! Swift Tokyo 初参加報告LT
hinakko2
0
190
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
360
Ruby GitHub Packages
bkuhlmann
0
620
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
410
受託開発でGitLab CI を活用していく
xiombatsg
1
270
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
250
雑に思考を整理する技術と効能
konifar
55
24k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
300
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
180
Folding Cheat Sheet #3
philipschwarz
PRO
0
110
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
22
3.9k
Scaling GitHub
holman
457
140k
Thoughts on Productivity
jonyablonski
57
3.8k
Git: the NoSQL Database
bkeepers
PRO
421
63k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
24
2.3k
The Cult of Friendly URLs
andyhume
73
5.7k
Clear Off the Table
cherdarchuk
82
310k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
It's Worth the Effort
3n
180
27k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
13k
Visualization
eitanlees
135
14k
How GitHub (no longer) Works
holman
304
140k
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