Well.........
then how do I use it?
I dont wanna define a view file for it
def self.download(fileobj)
send_file fileobj.filz.url, :type=>
fileobj.filz_content_type, :x_sendfile=>true
end
In such a case, it does not find download method from a view file on
when I call it as Fyle.download(...)
On Jul 28, 9:17 am, Frederick Cheung <[email protected]>
wrote:
> On Jul 28, 10:09 am, Ritvvij <[email protected]> wrote:
>
> > Hi,
>
> > I have a fyle object which is using paperclip plugin to store filz.
> > I want of ofcourse download the file from the application.
> > Now the problem I face is my application is not being able to find the
> > function send_file
>
> send_file is a controller method, not a model method.
>
> Fred
>
>
>
> > 1. I have actionpack in ruby gems and I can see the send_file function
> > in it
> > 2. I have done require 'actionpack' in the file where i m calling
> > send_file
> > 3. Stil i m getting error - undefined method `send_file'
>
> > Note: I have presently defined send_file in Fyle model.
> > def download
> > send_file filz.url, :type=> filz_content_type
> > end
>
> > I am presently on Mongrel
>
> > Does any one know about send_file method and how and where should it
> > be used?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---