On Tue, Aug 28, 2012 at 4:23 PM, Vinay Sri <[email protected]> wrote:

> Hello,
>
> I am very very new to Ruby on rails. Just joined as an Intern in a
> company. They gave me a task. I want to open the PDF in a new window
> based on the location id where we currently in. For example, In a
> database table we have a column name location id in one table. PDF's
> stored in the server. I want to get the PDF based on the location
> id(that might be in a drop down menu). Please help me to do that. I want
> some to teach me this concept.
>
> Thanks in advance
>
>
Do you know how to open it via web?
I'm not sure but it may be like this

PATH = http://localhost:300/files/document.pdf
PATH = http://localhost:300/path/to/folder/document.pdf

if so you just can do

<%= link_to "PDF file", PATH%>

Now they may have used gems (paperclip, carrierwave) and they have helpers.
If you have no idea what I'm talking about take a look at
http://ruby.railstutorial.org/ first so you can learn about this framework

JavierQ

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to