Hi, I've been searching for hours now and haven't found anything that helps.
What I want to do:
I need to call the check_login
-Method (as below), which needs parameters.
redirect_to check_login_users_url(
:user => {:name => input[1], :password => input [2] },
:stylesheet => 'scaffold',
:method => :get)
The point is that these params are sent in the method-call as in the "Redirected to"-line below.
Processing ApplicationController#execute(for 127.0.0.1 at 2009-12-19 00:28:40) [POST]
Parameters: {"command"=>{"line"=>"log dodo wg"}, "authenticity_token"=> <...token>}
Redirected to http://localhost:3000/benutzer/check_login?method=get&stylesheet=scaffold&user%5Bname%5D=dodo&user%5Bpassword%5D=wg
Completed in 9ms (DB: 0) | 302 Found [http://localhost/execute]
I want to prevent rails from putting the params into the url and pass them hidden instead.
When I send a form created with form_for
, there's nothing in the url, so I assume it must be possible.
Please tell me how to do that.
Steps tried
- I have tried different "html-verbs": get, put, post - no difference. Though the call of
check_login
is really short the url-with-params shows up in my Console - create an instance variable and pass it as param (strange, didn't work either)
- watch
form_for
working – without results, got no clue
//edith:
Thanks for all your help so far. Perhaps I didn't specify my problem in enough detail.
I've got a text_field
in which I enter short commands (experimentally). Its form calls execute
in AppController
, which in case of login-data performs redirect_to
check_login
. I don't need to access a webpage, I simply want to run the method. I liked the idea of putting it into :flash
, but I'm wondering if there's a "neater" way to do pass the data hidden.