On Nov 6, 2011, at 4:35 PM, Grary Stimon wrote:
request = 4_000_000
post :loan, {:loan_request=>request, :format => :json}
...finally the test log of the request is...
Processing by Sec223fAcquisitionController#loan as JSON
The influence of the :format=>:json bit is ... ^^here^^. If you
compare this to other requests, you'll probably see that they are "as
HTML"
Parameters: {"loan_request"=>"4000000"}
Completed 500 Internal Server Error in 28ms
What bugs me here is that I don't see the JSON format appear anywhere
above. I understand why the parser would choke on
'loan_request=4000000', because it's not JSON.
Grar
the "as JSON" is that the response is desired in JSON format, not that
the request parameters are in that format. You can see from the log
output that the parameter is what you expect:
params[:loan_request] == 4000000
What does the rest of the loan action look like?
-Rob
Rob Biedenharn
r...@agileconsultingllc.com http://AgileConsultingLLC.com/
r...@gaslightsoftware.com http://GaslightSoftware.com/
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.