views:

9

answers:

0

Hello friends!

My new app work with my small custom plugin (located in RAILS_ROOT/vendor/plugins/)

The problem is what plugin-init file make some actions like this:

ModelName.all

As you can see this is just a simple query.

The problem is, when i try to do rake-task: "rake db:migrate", i have some bad error:

Mysql::Error: Table 'shop_development.options' doesn't exist: SELECT * FROM `options`

I understand, this error caused when script want to work with model, but database doesn't filled with tables %)

But what i can do with this? I can't imagine how to refactor my plugin, and make him working nice without model-calls.

Maybe rails have some methods for this? (if rake_task_running? then not_do_staff end)