Shaban K.
2012-Mar-17 18:47 UTC
Agile web development with rails 4th edition adding sizes to the product
Hi I am going through the Agile web development with rails 4th edition book and I am trying to modify the depot application to allow the customer to select a size before purchasing a product. What and how would I have to modify the depot app to do this? -- 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.
Javier Quarite
2012-Mar-17 19:46 UTC
Re: Agile web development with rails 4th edition adding sizes to the product
size of what exactly? of a product? If so, I guess you only have to add a row to your table -- 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.
Colin Law
2012-Mar-17 21:25 UTC
Re: Agile web development with rails 4th edition adding sizes to the product
On 17 March 2012 18:47, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi I am going through the Agile web development with rails 4th edition > book and I am trying to modify the depot application to allow the > customer to select a size before purchasing a product. What and how > would I have to modify the depot app to do this?Better to work right through the tutorial first I think, then you will probably know the answer without having to ask here. If you don''t know by then it is not much good as a tutorial. 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.
Shaban K.
2012-Mar-18 10:10 UTC
Re: Agile web development with rails 4th edition adding sizes to the product
I am sort of stuck doing this myself below is my code and I keep getting this error "The action ''update'' could not be found for ProductsController" when I select the size and add the product to basket. What am I doing wrong? My source code is attached. Thanks in advance Attachments: http://www.ruby-forum.com/attachment/7158/size.txt -- 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.
Michael Pavling
2012-Mar-18 10:56 UTC
Re: Re: Agile web development with rails 4th edition adding sizes to the product
On 18 March 2012 10:10, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> What am I doing wrong?You''re not going through the whole tutorial, understanding it, and then moving on to develop your own projects. By all means twiddle with the example code, but always be able to get back to how the book says it should be, or else you may have troubles with the next exercise.> My source code is attached.You''re missing an "end" from your products_controller, but that wouldn''t cause the error message you describe; it''s more likely a cut''n''paste error... but if you make one pasting error.... you might make more. Also, do you intend to have two "Add to Cart" forms posting to different routes? -- 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.
Shaban K.
2012-Mar-18 11:10 UTC
Re: Re: Agile web development with rails 4th edition adding sizes to the product
Hi I have gone through most of the tutorials but for my own project I am trying to create my own e-commerce clothing site. I only intend to post to one route , my mistake. Michael Pavling wrote in post #1052134:> On 18 March 2012 10:10, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> What am I doing wrong? > > You''re not going through the whole tutorial, understanding it, and > then moving on to develop your own projects. > > By all means twiddle with the example code, but always be able to get > back to how the book says it should be, or else you may have troubles > with the next exercise. > >> My source code is attached. > > You''re missing an "end" from your products_controller, but that > wouldn''t cause the error message you describe; it''s more likely a > cut''n''paste error... but if you make one pasting error.... you might > make more. > Also, do you intend to have two "Add to Cart" forms posting to different > routes?-- 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.
Colin Law
2012-Mar-18 11:18 UTC
Re: Re: Re: Agile web development with rails 4th edition adding sizes to the product
On 18 March 2012 11:10, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi I have gone through most of the tutorials but for my own project I am > trying to create my own e-commerce clothing site. > > I only intend to post to one route , my mistake.Have a look in development.log and see what it says when you submit the form. If you still can''t get it working post the full error message. Have you not noticed that those replying are inserting their replies inline in the previous message? This should be a hint that you should do this yourself. It makes it easier to follow the thread. Colin> > Michael Pavling wrote in post #1052134: >> On 18 March 2012 10:10, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> What am I doing wrong? >> >> You''re not going through the whole tutorial, understanding it, and >> then moving on to develop your own projects. >> >> By all means twiddle with the example code, but always be able to get >> back to how the book says it should be, or else you may have troubles >> with the next exercise. >> >>> My source code is attached. >> >> You''re missing an "end" from your products_controller, but that >> wouldn''t cause the error message you describe; it''s more likely a >> cut''n''paste error... but if you make one pasting error.... you might >> make more. >> Also, do you intend to have two "Add to Cart" forms posting to different >> routes? > > -- > 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. >-- gplus.to/clanlaw -- 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.
Shaban K.
2012-Mar-22 08:25 UTC
Re: Re: Re: Agile web development with rails 4th edition adding sizes to the product
> Have a look in development.log and see what it says when you submit > the form. If you still can''t get it working post the full error > message. > > Have you not noticed that those replying are inserting their replies > inline in the previous message? This should be a hint that you should > do this yourself. It makes it easier to follow the thread. > > ColinWhat I have now done now is add sizes to the products table and also to the products controller to allow it to access the sizes which are available , what I now get when I try to look at the product is this exception: SQLite3::SQLException: no such column: sizes.product_id: SELECT "sizes".* FROM "sizes" WHERE "sizes"."product_id" = 4. All I want to be able to do is be able to select a size for the product and add it to the shopping cart. Attachments: http://www.ruby-forum.com/attachment/7177/product_view.txt http://www.ruby-forum.com/attachment/7178/products_controller.txt http://www.ruby-forum.com/attachment/7179/line_items.txt -- 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.
Colin Law
2012-Mar-22 09:06 UTC
Re: Re: Re: Re: Agile web development with rails 4th edition adding sizes to the product
On 22 March 2012 08:25, Shaban K. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> Have a look in development.log and see what it says when you submit >> the form. If you still can''t get it working post the full error >> message. >> >> Have you not noticed that those replying are inserting their replies >> inline in the previous message? This should be a hint that you should >> do this yourself. It makes it easier to follow the thread. >> >> Colin > > What I have now done now is add sizes to the products table and also to > the products controller to allow it to access the sizes which are > available , what I now get when I try to look at the product is this > exception: SQLite3::SQLException: no such column: sizes.product_id: > SELECT "sizes".* FROM "sizes" WHERE "sizes"."product_id" = 4.It might be helpful if you told us which line of code is generating that error. In fact it is always a good idea to show the complete error message. Before that though look at the code and try and work it out for yourself. It seems to be expecting sizes to have a column product_id (but presumably you had worked that out for yourself). Should sizes have that column? If so then have you added the column? Colin> > All I want to be able to do is be able to select a size for the product > and add it to the shopping cart. > > Attachments: > http://www.ruby-forum.com/attachment/7177/product_view.txt > http://www.ruby-forum.com/attachment/7178/products_controller.txt > http://www.ruby-forum.com/attachment/7179/line_items.txt > > > -- > 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- gplus.to/clanlaw -- 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.