Hi,
In my view I have
link_to_remote(image_tag(“trashcan.gif”), :url=>{:action=>‘destroy’,
:id=>jobtype.id}, :confirm=>I18n.t(:confirm_action),
:success=>"$(‘el_#{jobtype.id}’).fade()", :failure=>“alert(‘HERE I WANT
THE TEXT GENERATED BY THE CONTROLLER’)”)
And in the controller:
def destroy
id = params[:id]
render(:text=>“THIS TEXT”, :status=>:forbidden) and return if
Job.find(:all, :conditions=>[“type_id=?”,id]).size > 0
JobType.destroy(id)
render(:nothing=>true)
end
How can I get the text rendered by the controller ?
response[‘body’] can not be used here.
Thanks,
Mickael.