def destroy_question_xml
if params[:question][:id][:value] @question = Question.find(params[:question][:id][:value]) @question.destroy @question.save
end
end
The curious thing is that actually, on production machine, it send
correctly the values(“question”=>{“id”=>{“type”=>“integer”,
“value”=>“96”}}) , but still pop up the error NoMethodError (undefined
method `[]’ for nil:NilClass).
On Tue, Mar 17, 2009 at 5:29 PM, Enzo R. < [email protected]> wrote:
<id>{qdg.selectedItem.id}</id>
@question.save
thanks a lot for reading
Hi, the last two lines seem suspect because you’re trying to delete and
save
something. For example,
def destroy_question_xml
if params[:question][:id][:value] @question = Question.find(params[:question][:id][:value]) @question.destroy @question.save
end
end
On Tue, Mar 17, 2009 at 5:29 PM, Enzo R. < [email protected]> wrote:
<id>{qdg.selectedItem.id}</id>
@question.save
thanks a lot for reading
Hi, the last two lines seem suspect because you’re trying to delete and
save
something. For example,
def destroy_question_xml
if params[:question][:id][:value] @question = Question.find(params[:question][:id][:value]) @question.destroy @question.save
end
end
Thus, I would recommend checking your logic.
Good luck,
-Conrad
yeah, that was a problem, but not the resolution.
i got many classes with this kind of class(of course, without the logic
error) , and all of them works in local, don’t works on the production
server.
It means you have a filter called require_ssl in your application.
This kind of filter will usuallly either redirect or stop the current
request if it is not made over ssl (e.g https://example.com) find the
one in your app to see more. Either make the web request over ssl, or
skip the filter if you don’t need to use ssl. I’d recommend to use ssl
if this is a request that is being authenticated in some way.