I want to check the form data received from the form in ruby on rails controller.
I tried this but nothing is shown:
@user.to_yaml
where @user
is the form name(<%=form_for @user
)
I want to check the form data received from the form in ruby on rails controller.
I tried this but nothing is shown:
@user.to_yaml
where @user
is the form name(<%=form_for @user
)
the data sent by a form is stored in the params
hash (see this question for more information).
also, in development, just put a raise
in your controller action to show an error page with all request parameters displayed.
The above answer is correct. but will like to change something
all the details are stored in params only
and it will be better to show those in flash by doing flash.notice = params
as it will not effect the working of app
Why don't you check out the server log on the console or use the debugger gem that would keep track of the params and the files along which the request moves along...