Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <div id="rename">
  2. <%= render :template => 'persons/rename'%>
  3. </div>
  4.  
  5. <%= link_to 'Rename', {:controller => 'persons', :action => 'rename', :per_name => person.name}, :class => 'rename', :remote => true %>
  6.  
  7. -> <%= params[:per_name]%> #here I am trying to print the name from the link
  8.  
  9. $('a.rename').click(function(){
  10. $('div#rename').css('display', 'block');
  11. });
  12.  
  13. resources :persons do
  14. collection do
  15. match 'rename/:person_name' => 'persons#rename'
  16. end
  17. end
Add Comment
Please, Sign In to add comment