Where I can place mp3 files that I would like to have a link to within one of my views? The catch is that I do not want to create a database for these files, I just want to refer to them within the application folders. Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
send_file(path, options...) Store the path in your database and put the file someplace accessible by your application. On Apr 10, 5:51 pm, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote:> Where I can place mp3 files that I would like to have a link to within > one of my views? The catch is that I do not want to create a database > for these files, I just want to refer to them within the application > folders. > Thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So there is no way to just create a plain link on one of the views to an mp3 file without involving databases? I would prefer to just create a link that would directly open up a quicktime window. On Apr 10, 5:55 pm, "Robert Walker" <rwalker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> send_file(path, options...) > > Store the path in your database and put the file someplace accessible > by your application. > > On Apr 10, 5:51 pm, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote: > > > Where I can place mp3 files that I would like to have a link to within > > one of my views? The catch is that I do not want to create a database > > for these files, I just want to refer to them within the application > > folders. > > Thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Just hard code the path, if you don''t want to use a database. Put it in a variable, and use the variable in the send_file() call. On Apr 10, 11:59 am, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote:> So there is no way to just create a plain link on one of the views to > an mp3 file without involving databases? I would prefer to just create > a link that would directly open up a quicktime window. > > On Apr 10, 5:55 pm, "Robert Walker" <rwalker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > send_file(path, options...) > > > Store the path in your database and put the file someplace accessible > > by your application. > > > On Apr 10, 5:51 pm, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote: > > > > Where I can place mp3 files that I would like to have a link to within > > > one of my views? The catch is that I do not want to create a database > > > for these files, I just want to refer to them within the application > > > folders. > > > Thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Wait a second. Are you saying this is simply a static hyperlink to a static file on your web server? That''s called a "hyperlink." You can write one using an HTML <a href="http://www.domain.com/>A link to a file</a> tag. You don''t need Rails for that. However, if you really feel compelled to dynamically generate your static tag, you can use ActionView''s tag or content_tag helpers I suppose. On Apr 11, 6:47 pm, "David J. Orman" <orma...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Just hard code the path, if you don''t want to use a database. Put it > in a variable, and use the variable in the send_file() call. > > On Apr 10, 11:59 am, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote: > > > So there is no way to just create a plain link on one of the views to > > an mp3 file without involving databases? I would prefer to just create > > a link that would directly open up a quicktime window. > > > On Apr 10, 5:55 pm, "Robert Walker" <rwalker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > send_file(path, options...) > > > > Store the path in your database and put the file someplace accessible > > > by your application. > > > > On Apr 10, 5:51 pm, "Steve" <sdf...-RWB/UN2hA5c@public.gmane.org> wrote: > > > > > Where I can place mp3 files that I would like to have a link to within > > > > one of my views? The catch is that I do not want to create a database > > > > for these files, I just want to refer to them within the application > > > > folders. > > > > Thanks--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---