Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:59:59+00:00 2026-06-17T10:59:59+00:00

In a view file of mine I have a code like this: <td><%= link_to

  • 0

In a view file of mine I have a code like this:

 <td><%= link_to 'Destroy', link, method: :delete, data: { confirm: 'Are you sure ?' } %></td>

So after clicking on this it’s deleting that particular data form database. But this code is in a file named profiles/index.html.erb which is generated with the profile controller.

Now after clicking on destroy link the control is going to the links_controller.rb not profiles_controller.rb. But I want this to get redirected to profiles_controller.rb, so that I can do certain operations while deleting in my destroy action in my profiles controller and then get redirected to profiles/index.html.erb, not links/index.html.erb.
How to do this??

Thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:00:00+00:00Added an answer on June 17, 2026 at 11:00 am

    The second parameter to link_to is the destination of the link, ie. what you’re linking to – it sounds like you’re linking to the wrong place.

    If you want to link to the profiles controller you need to do that (ie. change link to whatever your route to the correct action of the profiles controller is).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code into my main view file: <html> <head> <script src=/app/static/js/jquery.js type=text/javascript>
This is the code I have. In my main .java file. public void showQuiz
In my index view file i have: $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$dataProvider, 'itemView'=>'_view', 'ajaxUpdate'=>false, )); A
I am getting this error in my view file. Here is my code please
I have a view file update.php and contains the following code: php foreach ($record
I'm trying to do this in a view file: <td><%= obj.user_ids.values.each {|user_id| link_to results_path(user_id)}
In my view file I current have the following code: @if ((Model.CustomerOrderTrackings != null)
I have a view file structure like: Views Company Department Employee ManageEmployee.cshtml and the
I have a view file(.cshtml) with this C# block in top of file: @{
As a dev I normally group my explorer detail view by file type. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.