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
120
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
43
New Features in Rails 4.2
murajun1978
0
900
FactoryGirl LT
murajun1978
1
66
Shinosaka.rb #3
murajun1978
0
51
Other Decks in Programming
See All in Programming
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
240
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
AHC041解説
terryu16
0
400
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
6k
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
ドメインイベント増えすぎ問題
h0r15h0
2
570
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Mobile First: as difficult as doing things right
swwweet
222
9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
BBQ
matthewcrist
85
9.4k
RailsConf 2023
tenderlove
29
970
Product Roadmaps are Hard
iamctodd
PRO
50
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
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