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
1
69
Rails Plugins in 20 minutes
excid3
August 22, 2024
Tweet
Share
More Decks by excid3
See All by excid3
Crafting Rails Plugins
excid3
1
410
Powerful Rails Features You Might Not Know
excid3
0
3.8k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Designing Experiences People Love
moore
142
24k
YesSQL, Process and Tooling at Scale
rocio
172
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
GitHub's CSS Performance
jonrohan
1031
460k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Building Adaptive Systems
keathley
42
2.6k
Designing for Performance
lara
608
69k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Practical Orchestrator
shlominoach
188
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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!