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
Rails Plugins in 20 minutes
Search
excid3
August 22, 2024
0
56
Rails Plugins in 20 minutes
excid3
August 22, 2024
Tweet
Share
More Decks by excid3
See All by excid3
Crafting Rails Plugins
excid3
1
370
Powerful Rails Features You Might Not Know
excid3
0
3.5k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
It's Worth the Effort
3n
183
27k
What's new in Ruby 2.0
geeforr
343
31k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
The World Runs on Bad Software
bkeepers
PRO
65
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How STYLIGHT went responsive
nonsquared
95
5.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Transcript
Chris Oliver Rails Plugins in 20 minutes
None
😱
What is a Rails plugin?
None
None
Rails Plugins • Routes • Models • Views • Controllers
• Jobs • Etc
None
Railtie vs Engine
Railtie The core of a Rails plugin • Initializers •
Configuration • Rake tasks
Engine Railtie with more features • Models • Controllers •
Views • Routes • Locales • Tasks
Your Rails app is an Engine.
None
$ rails plugin new
Railtie rails plugin new my_railtie
Engine rails plugin new my_engine —full
Mountable Engines
Mountable Engine rails plugin new my_mountable_engine —full —mountable
\ Mounting Rails Engines in Routes
Engine helper
main_app helper
Dependencies
gemspec
Load Order & Hooks
Rails Plugins Rails Load Order Initializers
None
on_load callbacks
None
None
None
Middleware
– Thoughtful government employees “The website should work only during
business hours. ”
🤔
None
None
None
None
Configuration
Configuration with Accessors
Extending Rails Configuration
Extending Rails Configuration
Generators
None
None
Extending Rails Generators
None
None
Models & Migrations
None
None
None
Rails Console
None
Thanks!