Saturday, June 8, 2013

[Rails] Hook for "rake db:migrate" to transfer command to plugin?

I want to put all app migrations in a plugin. And then when I run

> rake db:migrate

and as the command is not able to find migrations in
"App\db\migrate" directory (the default one) I want it to be redirected
to look for migration files in my plugin and use them from that
location.

My questions are:
1) Are there some predefined rails hooks? Something like a method

> migration_missing(find_migration_here)

2) If there are no special hooks, is it possible to implement the
behavior without much code or hacking Rails?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/40e58a3790222702e0d655af6f62ed00%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate