I have a class method in one of my models that I call from one of my
controller, like this:
1. def handle_some_uploaded_file
2. messages = MyModel.load_something_from_file(params[:data_file])
3. ...
4. end
The thing is that when I change MyModel (and restart the server), the
changes aren''t reflected. I can change MyModel.load_something_from_file
to raise an error, and still Rails won''t notice. Instead it is running
the code from before the model was changed!
First I thought this had to do with some obscure browser caching, but
clearing the caches didn''t help. I also tried adding a
"hello"-method to
MyModel and call it from the controller, but Rails just insisted that
there was no such method. I even removed the whole model once, but Rails
still didn''t notice!
My only suggestion is that the webserver (I have tried with both Mongrel
and WEBrick) is perfoming some very strange caching on this file
specifically and won''t let me update it.
I haven''t had this problem with any of my other models or controllers.
What can be wrong?
Thank you in advance!
--
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 post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---