Please sign in to comment.
avoid using alias in generators
Ruby's alias produces public methods, causing a spurious Thor task to be created. For example, this is the reason MigrationGenerator currently has two tasks: > ActiveRecord::Generators::MigrationGenerator.all_tasks.keys => ["singular_name", "create_migration_file"] singular_name was meant to be an attribute, not a task. Because it's public, it gets called as a task every time the generator is invoked. The fix is to ensure all generator methods have the correct visibility.
- Loading branch information...
Showing with 4 additions and 1 deletion.