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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Krzysztof Wawer
June 21, 2017
Programming
210
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Slim Ruby on Rails: Controllers & Middlewares
Krzysztof Wawer
June 21, 2017
More Decks by Krzysztof Wawer
See All by Krzysztof Wawer
The Good Architecture
wafcio
0
680
GIT - Good Practices
wafcio
0
110
Dry System
wafcio
0
130
dry-validations
wafcio
0
200
Validations in Ruby
wafcio
0
210
Generating a CSV file with ROM
wafcio
0
370
Trailblazer bez trailblazera
wafcio
0
260
ActiveRecord, DataMapper czy Agregacja encji
wafcio
0
220
Jak (nie) używać Service Object
wafcio
0
250
Other Decks in Programming
See All in Programming
えっ!!コードを読まずに開発を!?
hananouchi
0
220
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
590
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
860
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
800
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
510
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
500
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
継続モナドとリアクティブプログラミング
yukikurage
3
610
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
260
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
3
1.6k
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
140
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.1k
Amusing Abliteration
ianozsvald
1
230
Technical Leadership for Architectural Decision Making
baasie
3
440
Balancing Empowerment & Direction
lara
6
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
420
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
410
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
460
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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