how to declare model classes in Application.rb

V

Vikas Gholap

Hello all,
I am new to ruby development.
I created a simple online book store Application.
but when i select book & click on 'add to cart' it gives me error

"undefined method `model' for ApplicationController:Class"

class ApplicationController < ActionController::Base

model :cart
model :line_item

end

cart & line_item are two model classes.
I am storing the model cart in session
I'm using rails 2.2 version
So what's going wrong?
please help me to solve this problem.


Vikas
 
R

Ryan Davis

Hello all,
I am new to ruby development.
I created a simple online book store Application.
but when i select book & click on 'add to cart' it gives me error

please ask these questions on the ruby on rails mailing list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top