Skip to content

goldenboy-89/rails-engine-generator

 
 

Repository files navigation

rails-engine-generator

Stubs out a new engine plugin. Pass the engine name, either CamelCased or under_scored, as an argument. Pass –with-generator to add an example generator also.

This creates a plugin in vendor/plugins including an init.rb and README as well as standard plugin directories as well as app, config, and db directories.

Example

‘./script/generate engine Tickets`

creates a standard tickets plugin:

vendor/plugins/tickets/README
vendor/plugins/tickets/init.rb
vendor/plugins/tickets/install.rb
vendor/plugins/tickets/app
vendor/plugins/tickets/app/controllers
vendor/plugins/tickets/app/helpers
vendor/plugins/tickets/app/models
vendor/plugins/tickets/app/views
vendor/plugins/tickets/app/views/layouts
vendor/plugins/tickets/config
vendor/plugins/tickets/db
vendor/plugins/tickets/db/migrations
vendor/plugins/tickets/lib/tickets.rb
vendor/plugins/tickets/test/tickets_test.rb
vendor/plugins/tickets/tasks/tickets_tasks.rake

./script/generate plugin BrowserFilters –with-generator

creates a tickets generator also:

vendor/plugins/tickets/generators/tickets/tickets_generator.rb
vendor/plugins/tickets/generators/tickets/USAGE
vendor/plugins/tickets/generators/tickets/templates/

Copyright © 2009 Terry Schmidt. See LICENSE for details.

About

Generate Rails Engines

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%