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

  • Home
  • SEARCH
  • 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 6986993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:52:46+00:00 2026-05-27T18:52:46+00:00

I have a basic scaffold for products. I would like to have a unique

  • 0

I have a basic scaffold for products. I would like to have a unique spec page for each product. The spec page will be made in regular HTML as each product has unique specs. I figure I can simply create a file in the view and an appropriate route for the spec page. My question is: how to create a link to the spec page from the product show action?

For example: say product one is Honda civic. I will then manually create a spec file for civic, say spec_civic.html.erb. I will then write out the specs for the spec_civic.html.erb in HTML. Product two is Honda Accord. I will make a spec sheet for spec_accord.html.erb My question again is how to make a link from the product’s show action that goes to its spec page.

  • 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-05-27T18:52:46+00:00Added an answer on May 27, 2026 at 6:52 pm
    if File.exist?(File.join(Rails.root, "views", "cars", "_" + @car.model_name.underscore + ".html.erb"))
        render :partial => @car.model_name.underscore
    else
        render :partial => "generic_car"
    end
    

    this code is not complete and is for example only. You can use it in controller’s show action, or insert in show.html.erb (code needs to be modified for a view)

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

Sidebar

Related Questions

I have basic CSS experienced so I would like to know how can I
I have a basic quiz/survey type application I'm working on, and I'd like to
I have basic application with admin panel and direct_to_template home page. When I type
I have basic html stored in my database, which includes html such as the
I have basic code that looks like this: while(inputfileStream.good()) { for(int i = 0;i<levels;i++)
I have basic markup for a drop down nav, nested lists. The user will
What are containers/adapters? I have basic knowledge of C++ and its sub-topics like (class/templates/STL).
I have a project that has a list of gps coordinates. I would like
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear
Currently, i have basic C++ and PHP skills. But, i want to switch to

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.