Anyone?
Carlos Santana wrote:
> I am trying to generate a static archive (zip) as follows:
>
> #### Model has following method
> def generate_archive
> dir = "/tmp/#{self.id}"
> title = self.title.gsub(/^\s+/, '').gsub(/\s+$/, '').gsub(/\s+/,
> '-')
>....
.........
.........`
> ### #### ### ### ### #### ###
>
> - The problem is when I click/call on this method for the first time
> then it does not work saying missing file. The zip file is not ready at
> that point.
> - If I go back and click again then it works fine and instantaneously
> delivers the zip file.
> - Is there anyway I can fix this? I tried putting sleep method,
> however its not working either. And what is causing this problem? I
> thought above method wouldn't return until background jobs are complete.
>
> Any clues?
>
> -
> Thanks,
> CS.
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---