That means that @cart is nil. The error messages in rails are not
always perfectly clear but usually careful consideration of the
message will yield clues as to the problem.
> despite i have this code in my model called Card
>
> Cart Model:
>
> class Cart < ActiveRecord::Base
>
[snip]
> end
>
>
> end
>
> it is unable to identify it
>
> what is the problem
As I said at the top the problem is that @cart is nil, it is probably
not a problem in the model itself, but in the controller. Have a look
at the Rails Guide on debugging which will provide techniques you can
use to debug the code and work out why it is nil.
Colin