On 12 June 2010 11:14, Owain <[email protected]> wrote:
> There has been no suggestions on this.  Perhaps the question was not
> very well explained?
>
> I have a model called Product that has an attribute called
> product_type.  I have another model called Quote which creates a quote
> for a Product.  Quote belongs to Product.  And a QuoteController.
>
> How do I get the QuoteController to use a different view for its
> actions dependent upon the product_type?  In general most
> product_types will use the "normal" set of views for a quote so it
> would be excellent if the QuoteController was able to use the specific
> product_type views if they exist and if not fall back to the default
> set.

In the controller you can use render to show whatever view you like,
just test your product type and render the appropriate view.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to