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
140
shinosakarb #11 Rails 4 Pattenrs
murajun1978
December 20, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
How to Enjoy the Murajun’s Style
murajun1978
0
54
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.3k
Zeitwerk integration in Rails 6.0
murajun1978
0
110
Efficient development with GraphQL
murajun1978
0
310
Effective Debugging Apps in VS Code
murajun1978
1
900
tebukuro
murajun1978
0
120
Shinosaka.rb #17 Hands on
murajun1978
0
53
New Features in Rails 4.2
murajun1978
0
920
FactoryGirl LT
murajun1978
1
70
Other Decks in Programming
See All in Programming
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
320
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
130
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
380
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
350
ReadMoreTextView
fornewid
1
480
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
260
GoのGenericsによるslice操作との付き合い方
syumai
3
680
Deep Dive into ~/.claude/projects
hiragram
8
1.4k
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.3k
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
880
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
RailsConf 2023
tenderlove
30
1.1k
Gamification - CAS2011
davidbonilla
81
5.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Writing Fast Ruby
sferik
628
61k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
How to Ace a Technical Interview
jacobian
277
23k
Agile that works and the tools we love
rasmusluckow
329
21k
The Cost Of JavaScript in 2023
addyosmani
51
8.4k
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