# Plugin: modules or generators?

**URL:** <https://discuss.rubyonrails.org/t/plugin-modules-or-generators/1005>\
**Category:** rubyonrails-talk\
**Created:** [September 3, 2006, 4:09pm UTC](https://discuss.rubyonrails.org/t/plugin-modules-or-generators/1005 "2006-09-03T16:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Leitch](https://avatars.discourse-cdn.com/v4/letter/i/e79b87/32.png) [@Ian\_Leitch](https://discuss.rubyonrails.org/u/Ian_Leitch)\
**Post date:** [September 3, 2006, 4:09pm UTC](https://discuss.rubyonrails.org/t/plugin-modules-or-generators/1005/1 "2006-09-03T16:09:03Z")

</div>

Hi,

I’m writing a plugin (my first) that adds question validation support (alternative to captchas).

I’m obviously gonna need to provide a generator for the migration of the questions table, I’m just not sure if I should generate the model too or just leave it in the plugin. If I do leave the model in the plugin then won’t I also have to hardcode to table name in the migration? If I’m generating the model, should I just generate the lib/ system file too?

Also, is it OK to add an error to a record if the table doesn’t actually have a column for the error I’m adding?

Cheers
