How to make a respond_to by AJAX in Rails 3?
I have a form, that I send with using AJAX. The form is in the FirstsController . I need the form send to SecondsController . The form is sent and data saved. Then I wanna change the form by a text, I try to do by this way: def create ...saving... respond_to do |format| format.js { render :update do |page|; page << "$('#id_element').html('hellllloooooo');" end } format.html {} end end And I ma getting this error: ActionView::MissingTemplate (Missing template seconds/update, application/update with {:handlers=>[:erb, :builder, :coffee], :formats=>[:js, :html], :locale=>[:en, :en]}.): How should