Skip to content

Instantly share code, notes, and snippets.

@szimek
Created November 13, 2011 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szimek/1362112 to your computer and use it in GitHub Desktop.
Save szimek/1362112 to your computer and use it in GitHub Desktop.
Steps for creating Rails engine to separate existing app into smaller ones
  1. Isolated engine - short description
  2. Create an engine: rails plugin new <name> --full --mounted - undocumented
  3. mv <name> vendor/apps
  4. cleanup engine's Gemfile (?)
  5. add engine to main app's Gemfile
  6. routes in engine's config/routes.rb then mount in main app's config/routes.rb
  7. views - lookup paths; default paths, might need to reverse order
  8. tests - dummy app; use the main app instead
  9. namespaced controllers and views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment