Oluwayomi Oluwadara wrote:
Hello,
thank you for your time.I am actually developing an e commerce website for selling books online.the find_cart method is mean to find the cart displayed at the front end-for the users buying stuffs.Your help wil be appreciated,am just 2 weeks old in RoR

Regards and Respects,
In the sample application used in 'Agile Web Development with Rails' they define a Cart class (which is not derived from ActiveRecord::Base).  In their StoreController class they define a find_cart method as:
[code]
def find_cart
  @cart = (session[:cart] ||= Cart.new)
end
[/code]
Whether this has any applicability to your case is impossible to know without knowing a lot more about your application.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to