0

I'm new to Rails and ajaxification on Rails: I'm facing a problem in writing an ajax callback function. For example, if i am writing a callback function for a delete method and write a callback code for ajax in applicaton.js, it works fine when i have written format.js to this method as

format.js { render :nothing => true }

But what i want is both: this format.js works and also the callback function should work. How to do this?

Javier
  • 12,100
  • 5
  • 46
  • 57
User16119012
  • 957
  • 11
  • 25

1 Answers1

0

Can you simply try

format.js { render :json => {} }

instead of

format.js { render :nothing => true }

so that your callback function will be called.

suren
  • 969
  • 4
  • 22