Hi, i am new to ror. I am able to upload my home page into the appliction. but after that where can i place the other static pages of website, i mean pages like contact us , about us etc. where can i place these pages and how to access them. pls..help.. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 23 November 2010 08:43, venkata reddy <venkatareddy.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > i am new to ror. I am able to upload my home page into the appliction. > but after that where can i place the other static pages of website, i > mean pages like contact us , about us etc. where can i place these > pages and how to access them. pls..help..Two possibilities 1.Provide a controller to handle the static pages (call it main or something) then provide actions such as contacts and put the html in views/main/contacts.html.erb. Then it is linked to by your_domain.com/main/contacts. 2. You could just put the pages in the public folder in your app. Then if you have a page public/contacts.html it may be linked to by your_domain.com/contacts.html. I prefer the first as it keeps the static content separated from other stuff in public. You could also try googling for rails static pages which will provide many useful hits. 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dear colin, I have already created a controller called home and a view with index so there i written all my html code do create the home page. so now i wand to link the other static pages to lthe home pages. can u explain now!! On Nov 23, 2:23 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 23 November 2010 08:43, venkata reddy <venkatareddy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > i am new to ror. I am able to upload my home page into the appliction. > > but after that where can i place the other static pages of website, i > > mean pages like contact us , about us etc. where can i place these > > pages and how to access them. pls..help.. > > Two possibilities > 1.Provide a controller to handle the static pages (call it main or > something) then provide actions such as contacts and put the html in > views/main/contacts.html.erb. Then it is linked to by > your_domain.com/main/contacts. > 2. You could just put the pages in the public folder in your app. > Then if you have a page public/contacts.html it may be linked to by > your_domain.com/contacts.html. > > I prefer the first as it keeps the static content separated from other > stuff in public. > > You could also try googling for rails static pages which will provide > many useful hits. > > 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 11/23/2010 10:59 AM, venkata reddy wrote:> dear colin, > I have already created a controller called home and a view with index > so there i written all my html code do create the home page. so now i > wand to link the other static pages to lthe home pages. can u explain > now!! >There are many very useful tutorials on this topic. First I would suggest to get started with http://railstutorial.org/book Cheers, Jan> > On Nov 23, 2:23 pm, Colin Law<clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 23 November 2010 08:43, venkata reddy<venkatareddy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> Hi, >>> i am new to ror. I am able to upload my home page into the appliction. >>> but after that where can i place the other static pages of website, i >>> mean pages like contact us , about us etc. where can i place these >>> pages and how to access them. pls..help.. >> >> Two possibilities >> 1.Provide a controller to handle the static pages (call it main or >> something) then provide actions such as contacts and put the html in >> views/main/contacts.html.erb. Then it is linked to by >> your_domain.com/main/contacts. >> 2. You could just put the pages in the public folder in your app. >> Then if you have a page public/contacts.html it may be linked to by >> your_domain.com/contacts.html. >> >> I prefer the first as it keeps the static content separated from other >> stuff in public. >> >> You could also try googling for rails static pages which will provide >> many useful hits. >> >> 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 23 November 2010 09:59, venkata reddy <venkatareddy.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: Please don''t top post, it is easier to follow the thread if you insert your comments in the previous post. Thanks.> dear colin, > I have already created a controller called home and a view with index > so there i written all my html code do create the home page. so now i > wand to link the other static pages to lthe home pages. can u explain > now!!I am not sure I understand exactly. It is just like any other controller. To link to the home/index page do <%= link_to ''Home'', :controller => :home, :action => :index %> If you are in one of the other static pages in the home controller then you do not need to specify the controller. You may also need to specify routes for the pages, see the Rails Guide on routing.> > > On Nov 23, 2:23 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 23 November 2010 08:43, venkata reddy <venkatareddy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > Hi, >> > i am new to ror. I am able to upload my home page into the appliction. >> > but after that where can i place the other static pages of website, i >> > mean pages like contact us , about us etc. where can i place these >> > pages and how to access them. pls..help.. >> >> Two possibilities >> 1.Provide a controller to handle the static pages (call it main or >> something) then provide actions such as contacts and put the html in >> views/main/contacts.html.erb. Then it is linked to by >> your_domain.com/main/contacts. >> 2. You could just put the pages in the public folder in your app. >> Then if you have a page public/contacts.html it may be linked to by >> your_domain.com/contacts.html. >> >> I prefer the first as it keeps the static content separated from other >> stuff in public. >> >> You could also try googling for rails static pages which will provide >> many useful hits. >> >> 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@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dear marquardt, The tutorial u told is a bit confusing to me as it is especially written for unix users , (it contained too much content) and i am a windows user.so other than this can u let me know some other tutorials on rials.., On Nov 23, 3:15 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 23 November 2010 09:59, venkata reddy <venkatareddy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Please don''t top post, it is easier to follow the thread if you insert > your comments in the previous post. Thanks. > > > dear colin, > > I have already created a controller called home and a view with index > > so there i written all my html code do create the home page. so now i > > wand to link the other static pages to lthe home pages. can u explain > > now!! > > I am not sure I understand exactly. It is just like any other > controller. To link to the home/index page do > <%= link_to ''Home'', :controller => :home, :action => :index %> > If you are in one of the other static pages in the home controller > then you do not need to specify the controller. > You may also need to specify routes for the pages, see the Rails Guide > on routing. > > > > > > > > > > > On Nov 23, 2:23 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 23 November 2010 08:43, venkata reddy <venkatareddy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > Hi, > >> > i am new to ror. I am able to upload my home page into the appliction. > >> > but after that where can i place the other static pages of website, i > >> > mean pages like contact us , about us etc. where can i place these > >> > pages and how to access them. pls..help.. > > >> Two possibilities > >> 1.Provide a controller to handle the static pages (call it main or > >> something) then provide actions such as contacts and put the html in > >> views/main/contacts.html.erb. Then it is linked to by > >> your_domain.com/main/contacts. > >> 2. You could just put the pages in the public folder in your app. > >> Then if you have a page public/contacts.html it may be linked to by > >> your_domain.com/contacts.html. > > >> I prefer the first as it keeps the static content separated from other > >> stuff in public. > > >> You could also try googling for rails static pages which will provide > >> many useful hits. > > >> 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 this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
venkata reddy wrote in post #963302:> Dear marquardt, > The tutorial u told is a bit confusing to me as it is > especially written for unix users , (it contained too much content) > and i am a windows user.so other than this can u let me know some > other tutorials on rials..,I don''t see what difference it makes what OS you''re running? Rails routing is the same regardless of what platform you choose for development. In a Rails app the "public" folder serves as the web server''s document root. All requests (unless otherwise configured in your front-end web server) are routed to the Rails routing system. So as already explained by others you have a few options for static page content. You can either put the static files in the public folder and link directly to them with a standard HTML hyperlink. <a href="contact.html">Contact Us</a> Or you can provide a more organized and "Rails like" approach using standard Rails routing. http://guides.rubyonrails.org/routing.html -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.