comparison app/controllers/application_controller.rb @ 79:aea1779e6f18 live

Bug #34: Add a bit more description to the "Invalid form authenticity token" error. Not exactly a fix, but it'll have to do for now.
author Chris Cannam
date Wed, 15 Dec 2010 10:35:51 +0000
parents 94944d00e43c
children b859cc0c4fa1 4b1a23d81683
comparison
equal deleted inserted replaced
67:87f9c79026e5 79:aea1779e6f18
312 312
313 def invalid_authenticity_token 313 def invalid_authenticity_token
314 if api_request? 314 if api_request?
315 logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)." 315 logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)."
316 end 316 end
317 render_error "Invalid form authenticity token." 317 render_error "Invalid form authenticity token. Perhaps your session has timed out; try reloading the form and entering your details again."
318 end 318 end
319 319
320 def render_feed(items, options={}) 320 def render_feed(items, options={})
321 @items = items || [] 321 @items = items || []
322 @items.sort! {|x,y| y.event_datetime <=> x.event_datetime } 322 @items.sort! {|x,y| y.event_datetime <=> x.event_datetime }