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 7989283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:42:45+00:00 2026-06-04T12:42:45+00:00

I am having a hard time making the slug from Friendly_id in a nested

  • 0

I am having a hard time making the slug from Friendly_id in a nested route when editing and creating? the routes look great for show.

http://0.0.0.0:3000/test/tester2

This is the URL I am getting when i try to edit tester2 is:

http://0.0.0.0:3000/2/tester2/edit

What i would like to see is:

http://0.0.0.0:3000/test/tester2/edit

Here is my code.

team.rb

class Team < ActiveRecord::Base
  extend FriendlyId
  friendly_id :name, use: :slugged
  has_many :videos
  ...
end

video.rb

class Video < ActiveRecord::Base
  extend FriendlyId
  friendly_id :title, use: :slugged
  belongs_to :team
  ...
end

routes.rb

...
resources :teams, :path => '', :except => [:index] do 
  resources :videos, :path => '', :except => [:index] do
    get 'full_res_download'
    get 'web_download'
  end
end
...

Thank you for your help.

  • 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-04T12:42:46+00:00Added an answer on June 4, 2026 at 12:42 pm

    I think it will work if you use this as your url helper instead:

    edit_team_video_path(@video.team, @video)
    

    If you give it the id explicitly, that’s what it will use.

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

Sidebar

Related Questions

Hello I am having a hard time making this UI element look the way
I'm having a hard time making the connection between testing and code. I could
I'm making a sectioned table with fetched results, but am having a hard time
Hi I am having hard time making C# type inference do what I want.
I'm having a hard time making a Perl script to correctly parse an XML
I'm making a scrolling game on Android and am having a hard time figuring
I'm having a hard time making the chase camera follow the a car body.
I've been having a hard time making a JNDI data source work. Following instructions
I'm having a hard time making a design decision I have a class in
I am making a finger painting app and I am having a hard time

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.