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
Slim Ruby on Rails: Controllers & Middlewares
Search
Krzysztof Wawer
June 21, 2017
Programming
1
190
Slim Ruby on Rails: Controllers & Middlewares
Krzysztof Wawer
June 21, 2017
Tweet
Share
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
650
GIT - Good Practices
wafcio
0
92
Dry System
wafcio
0
120
dry-validations
wafcio
0
190
Validations in Ruby
wafcio
0
200
Generating a CSV file with ROM
wafcio
0
340
Trailblazer bez trailblazera
wafcio
0
240
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
200
Jak (nie) używać Service Object
wafcio
0
220
Other Decks in Programming
See All in Programming
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
CSC307 Lecture 06
javiergs
PRO
0
690
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
組織で育むオブザーバビリティ
ryota_hnk
0
180
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
AI巻き込み型コードレビューのススメ
nealle
2
420
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.4k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
51
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
730
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Google's AI Overviews - The New Search
badams
0
910
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Transcript
Slim Ruby on Rails: Controllers & Middlewares Krzysztof Wawer
Request https://medium.com/@christemple/what-is-rack-in-ruby-7e0615f1d9b6
Request Rack App Middlewares log auth cache HTTP Request HTTP
Response
Middleware
Rack Middleware http://railscasts.com/episodes/151-rack-middleware
Ruby on Rails Middleware stack $ rails new app $
rails new app --api $ rake middleware http://guides.rubyonrails.org/rails_on_rack.html#configuring-middleware-stack
Ruby on Rails Middleware stack use Rack::MethodOverride use Sprockets::Rails::QuietAssets use
WebConsole::Middleware use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash http://guides.rubyonrails.org/rails_on_rack.html#configuring-middleware-stack
RoR Middlewares problem https://github.com/rails/rails/blob/master/railties/lib/rails/application/default_middleware_stack.rb
http://paulserraino.com/rails/2016/02/29/rails-mountable-engines.html Rails Engines
Ruby on Rails Engine http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
Controller
None
None
ActionController::Base http://api.rubyonrails.org/classes/ActionController/Base.html
ActionController::API http://api.rubyonrails.org/classes/ActionController/API.html
ActionController::Metal http://api.rubyonrails.org/classes/ActionController/Metal.html
ActionController::API http://api.rubyonrails.org/classes/ActionController/API.html
Why ?
• Strong Parameters • Params Wrapper
• Strong Parameters • Params Wrapper Mapping
Mapping - missing part Nested Attributes - revealing structure