简体   繁体   中英

Rails 2.3.8 causing js call to ImageController forget current_user

After upgrading from rails 2.1.2 to 2.3.8 the call to imagecontroller through an applet(within a js function) no longer has stored current_user data available. This is causing the image to not load. Not sure why on making the most minimal changes for this upgrade this just stopped working.

Here is the code...

The JavaScript function: document.write param name="page" value="' + file_location_of_image +

This results in http request : http://localhost/suburi/directory_of_image/image.jpg

There is a route configuration to handle the action "directory_of_image" that in turn calls a "send_data" with the image after a before filter :login_required. The login_required returns false because current_user gets reset at this point and the image never gets back to the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM