storing and reading information from cookies is incredibly simple in Rails. much like storing information in the session, the syntax for using cookies is
cookies[:key_name] = “Vicky Visitor”
So if all you care about is the user, you can do something like this:
cookies[:user_id] = @user.id
and when you’re ready to retrieve the information:
@user = User.find(cookies[:user_id]) if cookies[:user_id]
once you have the user, you should be able to figure out what their last order was, their name, etc.