I have a 10 products but I want particular product default on display. Example If type http://localhost/products then product display should be product xyz.
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
I’d create a new boolean column like :default_product, then in the model use a scope like “scope :feature_product, first(:conditions => {:default_product => true})”. Then, in the controller, use :feature_product to instead of all by doing Product.feature_product in the index method.