javascript - RoR: escape_javascript and render :partial -
while updating rails application ruby 1.8 2.1, ran following problem. code used before in controller:
def upload_partial() escape_javascript(render :partial => "plupload_partial") end
doesn't seem working anymore.
routes.rb:
match 'items/upload_partial' => 'items#upload_partial', :via => [:get, :post]
the view contains html along javascript. i'm getting following error:
nomethoderror (undefined method `gsub' #<array:0x00000003f35590>): app/controllers/item_controller.rb:31:in `upload_partial'
when remove escape_javascript(), code executes correctly. guess function expects string , uses gsub() function escape js, render :partial doesn't return proper string (anymore) of ruby 2.x
anyone had similar problem?
Comments
Post a Comment