respond_to do |format|
format.json { render :json => json and return }
end
end
But the problem is that the underlying method get_customers might have
called a render :text => 'Invalide Parameters or whatever' earlier and
the later code under the respond_to gives double render error. Is
there any way to discard the results of the previous rendering and
start at a clean slate?
> respond_to do |format|
> format.json { render :json => json and return }
> end
> end
> But the problem is that the underlying method get_customers might have
> called a render :text => 'Invalide Parameters or whatever' earlier and
> the later code under the respond_to gives double render error. Is
> there any way to discard the results of the previous rendering and
> start at a clean slate?
> Regards,
> Moshin
return from the action early.
return if performed?
And what if we need to render in any case? By wiping out the previous
renders?