Skip to content

Instantly share code, notes, and snippets.

@tagrudev
Created November 14, 2012 15:05
Show Gist options
  • Save tagrudev/4072644 to your computer and use it in GitHub Desktop.
Save tagrudev/4072644 to your computer and use it in GitHub Desktop.
Spork.each_run do
...
# Hack to ensure models get reloaded by Spork - remove as soon as this is fixed in Spork.
# Silence warnings to avoid all the 'warning: already initialized constant' messages that
# appear for constants defined in the models.
silence_warnings do
Dir["#{Rails.root}/app/models/**/*.rb"].each {|f| load f}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment