I’m still real new to RoR so take this with a grain of salt…
In general, the result of the processing that takes place in a
controller
action is rendered (i.e., output) in a view with the same name as the
action. You’re trying to produce output in the controller. I don’t
know
enough to say for sure that that won’t work. But if I were sitting in
the
next cubicle and you hollered over “hey bill, my ‘send_message’ action
isn’t rendering like I expect it to”, I’d ask… “what does your
‘send_message’ view look like?”
HTH,
Bill
----- Original Message -----
From: “Martin S.” [email protected]
To: [email protected]
Sent: 2006-03-29 7:21 AM
Subject: Re: [Rails] Re: Collecting data from forms
Hi there,
On Mar 29, 2006, at 1:34 PM, Piotr U. wrote:
How can I transform the content from the form to a variable so
that I can use it in a system() command ?
Best regards,
Martin S.
from = (params[:message][:from])
message = (params[:message][:message])
Tried to do a
puts “the message is from #{from}”
but is quiet.
What is the right way to print the content?
This is how the controller looks like now:
def send_message
from = (params[:message][:from])
text = (params[:message][:text])
puts “from: #{from}” # says nothing.
puts “message: #{message}” # empty here as well.