How to Troubleshoot Apps for the Modern Connected Worker
Â
Rails Engine :: modularize you app
1. Rails Engine
An awesome tool to extend your rails application
Muntasim Ahmed
Platform Architect @ Tasawr Interactive
https://github.com/railscash
muntasim@tasawr.com
2. Agenda
⢠Why Rails Engine
⢠What is Rails Engine
⢠How it works with Rails Core
⢠Who are they
⢠Where is your interest
6. Rails Engine ?
⢠pre-packaged application
⢠able to be run or mounted within another Rails
application
⢠can have its own models, views, controllers,
generators and publicly served static files
12. Rails engine walk-through
⢠Create an engine
⢠Implement requirements in app, lib etc.
⢠Test
⢠Mount to main app
⢠Override where necessary
⢠And done!
13. Rails engine walk-through
Create
rails plugin new awesome_engine --mountable
Then generate mvc stuffs, test
In App Gemfile
gem "awesome_engine", path => "awesome_engine_path
In App Route
mount AwesomeEngine::Engine => "/awesome_engine_path", as =>
âawesome_engine"
14. Rails engine walk-through
Hit localhost:3000/awesome_engine_path
(mount point)
It will hit engine's root path
Welcome to awesome engine
home!