small medium large xlarge

Generic-user-small
20 Nov 2013, 11:01
Božidar Ševo (1 post)

we have two things that we do: rails generate scaffold Card and rails db:migrate

and then there is code for current_cart.rb, but there is no info that we should make that file our own! It might be better to say it in a sentence so people can know what to do ;)

Generic-user-small
02 Dec 2013, 08:32
Ben Kwok (4 posts)

Agree, the CurrentCart module is just created out of blue, makes me wondering for a while that whether the book I have is incomplete or what. This should be the first file in the book so far that has to be created by the reader (all we’ve done earlier is just modifying existing files created by Rails)

Like the previous well organized chapters Sam should provide more explaination on what the Concern folder is and why the CurrentCart module in that folder, and what’s the usage. And more importantly, in what case a developer should do the same.

Generic-user-small
05 Feb 2014, 00:53
Dennis Sutch (13 posts)

Iteration D1 also needs an explanation of concerns. What are they and why are they useful?

Generic-user-small
24 Apr 2014, 07:32
Babak Esfandiari (1 post)

I agree with the above commenters. I expected the depot_f folder that I downloaded from the website to contain the CurrentCart module, but it wasn’t there either. In fact there’s no concerns folder at all. This makes me think concerns are a rails 4 concept, and the code is only current as of Rails 3.2.

Generic-user-small
18 May 2014, 09:27
Kevin H (2 posts)

So just to confirm, the current_cart.rb file containing the CurrentCart module is one that we have to create ourselves?

It was not created when i ran the $rails generate scaffold Cart command and i’m a little confused after a lot of googling.

Generic-user-small
06 Jun 2014, 04:18
Brian Lobdell (2 posts)

Anyone resolve the issue? I’m stuck on the same part too.

Generic-user-small
22 Aug 2014, 15:50
poojan shah (1 post)

I’ve found the link below to be useful

http://richonrails.com/articles/rails-4-code-concerns-in-active-record-models

  You must be logged in to comment