Forum: Ruby on Rails LoginGenerator called on Form Submission

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ethan S. (Guest)
on 2006-01-10 15:55
I have login authentication set for the submit action of a form. I want
the form to be visible to unauthenticated users but when they fill in
the form and submit it, I want it to redirect to the login page and then
onto the original form submission action after the user is
authenticated. This part is easy.

The hard part is, how do I pass the parameters collected from the
original form through the login form and then on to the action of the
original form?

I was messing around with the actual login_system.rb code without much
success. Perhaps there is a better way?

This is what I was trying:

In login_system.rb:

Originally:

def access_denied
      redirect_to :controller => "/account", :action => "login"
end

I changed this to:

def access_denied
render_component :controller => "account", :action => "login", :params
=> @params
 end

This was not quite working.  Any suggestions?
This topic is locked and can not be replied to.