Topic: Newbie - cookies and controller

I have a code which is using cookies. If a code uses cookies INSIDE a method - program is working OK. If a code uses cookies OUTSIDE any method - I am getting an error message.  This code is issuing an error:  class UsersController < ApplicationController   print  cookies[:user] +