• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • 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
 
Kiran SonawaneProject LeadCommented:
You can prompt to link button as follows

<%= link_to 'Rename', 'javascript:prompt("Your file name? : ")' %>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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