You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is a bug or a feature request, but currently (using Rails3.0.5/Spork0.9.0.rc4), if you want your models reloaded without putting your entire environment load into the Spork.each_run block, you must either use a Sporkfile or manually reload the files (i.e.:
Dir[Rails.root.join("app/models/*/.rb")].each { |f| load f }
It feels like the default should be for models to be reloaded, but if thats counter to the philosophy, feel free to close this issue.
The text was updated successfully, but these errors were encountered:
Maybe you can come up with a better implementation, I am open to ideas.
Currently, spork does auto reload models by defualt by preventing them from being preloaded. (And other dev code like controllers). Some plugins cause the model code to be preloaded so some work is required to block that from happening. Spork.trap_method is the weapon of choice usually. There is a wiki article. Can you read it and lemme know what you think?
If you look at the cucumber features , it is the default behavior to reload models and others.
Spork might be too difficult to understand as this is a common gotcha.
I'm unsure if this is a bug or a feature request, but currently (using Rails3.0.5/Spork0.9.0.rc4), if you want your models reloaded without putting your entire environment load into the Spork.each_run block, you must either use a Sporkfile or manually reload the files (i.e.:
Dir[Rails.root.join("app/models/*/.rb")].each { |f| load f }
It feels like the default should be for models to be reloaded, but if thats counter to the philosophy, feel free to close this issue.
The text was updated successfully, but these errors were encountered: