Dear Folks, I am Web developer and have experience mainly with the Django Web framework for Python and wish to learn ROR. I am currently using Rails 3.0.3 and was getting a routing error whenever I added a view to a controller until I found out I had to add the path to the routes.rb file under the config directory. Is this new in Rails 3? I am asking this because I was following the example in "Agile Web Development with Rails 3rd Edition" which uses Rails 2 and getting the routing error. I also find that if use the "rails generate" command the routes.rb file is automatically updated. Does this mean that the proper way to create views and controllers is to use the above command. If so how do I create a view function in an existing controller without having it being overwritten or is the manual way the only way to do this? I hope that is clear. Thanks. -- 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.
depends on your requirement use "collection" or "member" in your route. thanks abhis On Tue, Dec 7, 2010 at 3:27 PM, Nandakumar Chandrasekhar < lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Dear Folks, > > I am Web developer and have experience mainly with the Django Web > framework for Python and wish to learn ROR. > > I am currently using Rails 3.0.3 and was getting a routing error > whenever I added a view to a controller until I found out I had to add > the path to the routes.rb file under the config directory. > > Is this new in Rails 3? I am asking this because I was following the > example in "Agile Web Development with Rails 3rd Edition" which uses > Rails 2 and getting the routing error. > > I also find that if use the "rails generate" command the routes.rb file > is automatically updated. Does this mean that the proper way to create > views and controllers is to use the above command. > > If so how do I create a view function in an existing controller without > having it being overwritten or is the manual way the only way to do > this? > > I hope that is clear. > > Thanks. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 December 2010 09:57, Nandakumar Chandrasekhar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Dear Folks, > > I am Web developer and have experience mainly with the Django Web > framework for Python and wish to learn ROR. > > I am currently using Rails 3.0.3 and was getting a routing error > whenever I added a view to a controller until I found out I had to add > the path to the routes.rb file under the config directory. > > Is this new in Rails 3? I am asking this because I was following the > example in "Agile Web Development with Rails 3rd Edition" which uses > Rails 2 and getting the routing error.You are liable to run into a lot of problems if the version of rails you are using is not close to that of your tutorial. You could have a look at railstutorial.org with has a good rails 3 tutorial. It is free to work through online, or pay for the book I think. Also work through the Rails Guides, starting with Getting Started of course.> > I also find that if use the "rails generate" command the routes.rb file > is automatically updated. Does this mean that the proper way to create > views and controllers is to use the above command.For beginners at least probably yes.> > If so how do I create a view function in an existing controller without > having it being overwritten or is the manual way the only way to do > this?You can only use the generators the first time, then it is up to you. 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.