Harold
unread,Feb 5, 2009, 3:33:29 PM2/5/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hi group,
I have a line of code in environment.rb that cannot be run during a
rake db:migrate, as it depends on some tables being present.
I need to find a way to enclose this line in a check for db:migrate. I
know how to check if we're in a rake task with:
unless defined?(Rake)
# do stuff, but skip when run from rake tasks
end
How can I take this further to make check if I'm running the rake
db:migrate task?
Thanks,
-H