# LoginGenerator called on Form Submission

**URL:** <https://www.ruby-forum.com/t/logingenerator-called-on-form-submission/52052>\
**Category:** Rails\
**Created:** [January 10, 2006, 2:55pm UTC](https://www.ruby-forum.com/t/logingenerator-called-on-form-submission/52052 "2006-01-10T14:55:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![etschreiber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a5b964/32.png) [@etschreiber](https://www.ruby-forum.com/u/etschreiber)\
**Post date:** [January 10, 2006, 2:55pm UTC](https://www.ruby-forum.com/t/logingenerator-called-on-form-submission/52052/1 "2006-01-10T14:55:42Z")

</div>

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?
