How can I save the session and cookies in a Rails app using Mechanize to handle a URL, and store the values in a rails session? -



How can I save the session and cookies in a Rails app using Mechanize to handle a URL, and store the values in a rails session? -

i want save session of url handle using mechanize, in rails app. current code is:

@agent = mechanize.new if params[:more].to_i == 1 @agent.cookie_jar.load session[:jar] end page = @agent.get(url) @agent.cookie_jar.save_as session[:jar], :session => true

this seemed work fine, realized cookie beingness saved in root directory of project, not fine. how can save session , cookies of url accessed mechanize rails session?

ruby-on-rails session cookies mechanize

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -