• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

rails 2.3.x link_to tag

I have this in the view

<%= link_to 'Rename', :controller => 'ocrs', :action => 'rename_file', :query => file_name %>

when i click on the link, i want it to show a prompt box ( just like :confirm =>'Are you sure', :method =>delete) but instead of yes/no , i want the user to input something in that box. ( the name the file is going to be renamed to), and that entry to be available in the controller/action (ocrs / rename_file) .
0
singsunn
Asked:
singsunn
1 Solution
 
sonawanekiranCommented:
You can prompt to link button as follows

<%= link_to 'Rename', 'javascript:prompt("Your file name? : ")' %>
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now