Having Trouble Rendering Javascript In Rails
Here's the relevant controller code: if @song.update_attributes(params[:song]) respond_to do |format| format.js { render :action => 'success' } end else Here'
Solution 1:
You need to to_s
your updated_at
, because escape_javascript
expects a String. updated_at
returns a ActiveSupport::TimeWithZone
.
Hope this helps.
Post a Comment for "Having Trouble Rendering Javascript In Rails"