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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Javier Quarite
2012-Aug-28 21:30 UTC
Re: How to open the pdf from the server via database?
On Tue, Aug 28, 2012 at 4:23 PM, Vinay Sri <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hi Javier, Thank you so much for your reply. I am looking for a online tutor to teach me through skype and teamviewer. Do u know anyone? I am ready to pay. Javier Quarite wrote in post #1073677:> On Tue, Aug 28, 2012 at 4:23 PM, Vinay Sri <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> 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-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Scott Eisenberg
2012-Aug-28 23:24 UTC
Re: Re: How to open the pdf from the server via database?
Go to crossloop.com and go through their directory of paid helpers. On Aug 28, 2012, at 5:34 PM, Vinay Sri <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi Javier, > > Thank you so much for your reply. I am looking for a online tutor to > teach me through skype and teamviewer. Do u know anyone? I am ready to > pay. > Javier Quarite wrote in post #1073677: >> On Tue, Aug 28, 2012 at 4:23 PM, Vinay Sri <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >>> 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 > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 28 August 2012 22:23, Vinay Sri <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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.Try working through a tutorial such as railstutorial.org which is free to use online and will give you the basics or rails. You have not given us sufficient detail to answer your question directly. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
INDIAN RAILS DEVELOPER
2012-Aug-29 09:27 UTC
Re: How to open the pdf from the server via database?
What all things you want to learn,i can teach you.email me on paritoshparitosh57-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tp2F9_YPqpMJ. For more options, visit https://groups.google.com/groups/opt_out.
Loganathan Sellapa
2012-Aug-29 09:29 UTC
Re: Re: How to open the pdf from the server via database?
+1 regards, Loganathan Mob: +91 7760780741 | +91 9944414388 Skype: loganathan.sellappa ViewMe <http://vizualize.me/loganathan> On Wed, Aug 29, 2012 at 2:57 PM, INDIAN RAILS DEVELOPER < paritoshparitosh57-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What all things you want to learn,i can teach you.email me on > paritoshparitosh57-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/tp2F9_YPqpMJ. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
+1 On Wed, Aug 29, 2012 at 2:59 PM, Loganathan Sellapa <loganathan.ms-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> +1 > > regards, > Loganathan > Mob: +91 7760780741 | +91 9944414388 > Skype: loganathan.sellappa > ViewMe <http://vizualize.me/loganathan> > > > On Wed, Aug 29, 2012 at 2:57 PM, INDIAN RAILS DEVELOPER < > paritoshparitosh57-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> What all things you want to learn,i can teach you.email me on >> paritoshparitosh57-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/tp2F9_YPqpMJ. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- With Regards, Harika Grandhi SIFY SOFTWARE LIMITED, Software Developer, Chennai. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
INDIAN RAILS DEVELOPER
2012-Aug-29 15:43 UTC
Re: Re: How to open the pdf from the server via database?
Thanks for plus-ing :-) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/NrUxp79r_q0J. For more options, visit https://groups.google.com/groups/opt_out.
Here is the Task... The EPC’s(PDF''s) themselves are not stored in the database, this is because each client can have hundreds of EPCs and we don’t want these to increase the size of the database, instead we save the EPC’s on the server and link to them in the database. To get the path of the EPC you need to get the path out of the database. This can be done using the following SQL. Select C."value"||A.epc_file_name From DBA.enr_rds_xml_datas A Join DBA.GlobalIniFile B on B.section = ''Paths'' and B.ident = ''EPCStore'' Where A.location_id = MyLoCode And A.is_current = 1; You might want to look at creating a view for the above SQL and then creating a Model for it so that you can access the data in Ruby easily. You will need to create a new page for this as there is no existing one currently. The EPC that is opened will depend on the location that the user is currently on. The is_current flag in enr_rds_xml_datas will ensure that only one EPC is returned for the current location. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Сергей Грибовский
2012-Aug-29 17:16 UTC
Re: Re: How to open the pdf from the server via database?
Hello, I can help you with your task for three ''coz it simple. I want to practise in English so I think it can be useful for me too. Skype:embeddedcoder. 29.08.2012 21:02 пользователь "Vinay Sri" <lists@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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.