You need to Protect all of your controllers with a before filter that redirects to login unless they're logged in.
Sent from my iPhone On 29/01/2009, at 4:39 PM, Tony Puthenveettil <[email protected] > wrote: > > Hi all, > In my web application, after logging out, if Back button of the > browser > is clicked, it takes to the previous logged in pages and allows all > operations without logging in. The layout, however, doesn't change, > but > the yield pages. > > Please help me prevent that back button operation after logout. Given > below is my logout controller. > #Controller > def logout > if session[:admin] || session[:user] > reset_session > flash[:notice] = 'Logged out successfully' > redirect_to :controller => 'homes', :action => 'index' > else > flash[:error] = 'Not logged in' > end > end > > Your prompt response is appreciated. > -- > Posted via http://www.ruby-forum.com/. > > > --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

