Several solutions in the before mentioned post were suggested. I used:

  before_filter :set_cache_buster

  def set_cache_buster
    response.headers["Cache-Control"] = "no-cache, no-store, max-
age=0, must-revalidate"
    response.headers["Pragma"] = "no-cache"
    response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
  end

I'm using Devise for authentication. All works like a charm.


On 10 mei, 09:52, Michael Pavling <pavl...@gmail.com> wrote:
> On 10 May 2012 08:46, hanish jadala <emailtohoneyr...@gmail.com> wrote:
>
> > thanks for your reply i have added your code and i checked it. if i click
> > back button after logout it is still going back to app but it is give me the
> > error "
>
> > undefined method `username' for nil:NilClass" it shows it going back to app.
>
> It's not "my code" - it's sample code from the Internet.
> Your error is now in your code - probably in the handling of
> controller actions when users are not logged in.

-- 
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-talk@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