views:

35

answers:

2

I would like to return the id of a newly created object for my ajax call instead of returning the view associated with the controller method.

+1  A: 

yes , you can .

render :text=> "the text that you want to return"
NM
+1  A: 

You can do

render :text => @your_object.id

and then cast your responseText to integer in the javascript handler if needed.

neutrino