4

Generators should raise an error if an attribute has an invalid index by p8 · Pu...

 2 years ago
source link: https://github.com/rails/rails/pull/42694
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Member

p8 commented 7 days ago

Summary

When passing an invalid index type to a generator, the index is silently
ignored. For example when misspelling the index:

bin/rails g model post title:string:indxe

Instead of silently ignoring the invalid index, the generator should
raise an error.

This continues the work in d163fcd
where we started raising errors if the attribute type is invalid.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK