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.
this code is not complete and is for example only. You can use it in controller’s
showaction, or insert inshow.html.erb(code needs to be modified for a view)