This project is archived and is in readonly mode.

#5389 ✓resolved
jack dempsey (jackdempsey)

split out migration logic in generators

Reported by jack dempsey (jackdempsey) | August 17th, 2010 @ 04:03 AM

Currently the ActiveRecord::Generators::Base class inherits from NamedBase. This means that any generator that wants to make use of a method such as migration_template needs to pass in a NAME to the generator. This so far has always fit the current generator usage well, but for others in the future it may be inconvenient.

This simple patch pulls the logic out into a module that another generator could easily include and use to build a non NamedBase subclass that creates a migration.

We could also have ActiveRecord::Generators::Base inherit from Base instead, but I imagine that would lead to a lot of other unnecessary and perhaps complex changes.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages