Hi
You can check params[:commit] In first case its value is ‘First’
and in second it is ‘Second’
Here’s a hint: Submit a form and look at the development.log. You can
see clearly what was sent in the params hash. Incidentally this works
for any request sent to your Rails app.
Here’s a hint: Submit a form and look at the development.log. You can
see clearly what was sent in the params hash. Incidentally this works
for any request sent to your Rails app.
There you go again, teaching people how to fish…
Pretty soon they will all be reading the framework documentation,
adopting an inquisitive nature, performing their own experiments, and
not coming here to post their questions for all of us to answer, while
we really should be doing the work we get paid for…
Are you trying to turn this forum into a wasteland, filled with only the
most esoteric and diabolical of questions???
Thank you all for your reply. The best was of course to check my
console as I knew my variables were there before, no clue why I forgot
about this.
I am not scared to ask another question; I use a form_for to output
the data fields of a class to the user, I receive this back as a
param. What is the best way to use this param again as output to data
fields to the user without actually saving the class?
I have tried using new/clone but it looks all pretty hacky. The nicest
solution would be to extract all variables out of the class and handle
them separately but thats quite some code and so far rails has shown
that more duplicate code is mostly incorrect.