Rails: respond_to return unknown format error

This error occurs when you use only format.js inside respond_to block

#Only format.js creates error
respond_to do |format| format.js { render 'update' } end
#To get out of this error add format other than format.js
respond_to do |format|
   format.html { render :partial => 'new_proposal_wrapper' }
   format.js { render 'update' }
end

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s