Guest User

Untitled

a guest
Feb 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. --- Before I click 'headware' (to remove tag)
  2.  
  3. Current Tags
  4.  
  5. shirt
  6. headwear
  7.  
  8. Other Tags
  9.  
  10. jacket
  11.  
  12.  
  13. --- After I click 'headware'
  14.  
  15. try { $("tags").update("
  16. Current Tags
  17. \nshirt
  18. \n\n
  19. Other Tags
  20. \njacket
  21. headwear
  22. "); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\"tags\").update(\"
  23. Current Tags
  24. \nshirt
  25. \n\n
  26. Other Tags
  27. \njacket
  28. headwear
  29. \");'); throw e }
  30.  
  31.  
  32. --- code used to create link to perform remove (in _remove_tag.rhtml)
  33.  
  34. <%= link_to_remote remove_tag.tag, :update => "tags", :url => { :action => :remove_tag, :tag => remove_tag, :id => @product} %><br />
Add Comment
Please, Sign In to add comment