Guest User

Untitled

a guest
Feb 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. I have:
  2.  
  3. VIEW:
  4.  
  5. <%= form_remote_tag :url => {:controller => 'graphs',
  6. :action => 'img_url'}, etc
  7.  
  8.  
  9. CONTROLLER:
  10.  
  11. def img_url
  12. render_text "<img src=/graphs/total?graph%5Bstart%5D=#{params[:graph][:start]}&graph%5Bperiod%5D=#{params[:graph][:period]}&graph%5Brate%5D=#{params[:graph][:rate]}>"
  13. end
  14.  
  15. This is working, but now I want :
  16.  
  17. VIEW:
  18.  
  19. <%= form_remote_tag :url => {:controller => 'graphs',
  20. :action => 'img_url("total"'}, etc
  21.  
  22. CONTROLLER:
  23.  
  24. def img_url(type)
  25. render_text "<img src=/graphs/#{type}?graph%5Bstart%5D=#{params[:graph][:start]}&graph%5Bperiod%5D=#{params[:graph][:period]}&graph%5Brate%5D=#{params[:graph][:rate]}>"
  26. end
  27.  
  28. But its not working like that. :/
Add Comment
Please, Sign In to add comment