El Monday 16 February 2009 20:28:02 Mike Gaffney escribió:
> So I've been thinking for a while about how we can reduce the code in
> the generic_view_paths hack. It occurs to me that we really only need to
> depend on the existence of a partial.
>
> Here's what I mean, generic logic boils down to this 3 step cascading
> logic:
>
> - does a partial or template exist in the normal view path (eg in the
> folder under app/views named for the controller), if so, render it.
> - does a partial or template exist in /active_scaffold_overrides, if it
> does, render it
> - does a partial or template exist under the view path
> vendor/plugins/active_scaffold/frontends/#{frontend}, if so, render it
> - Throw an exception.
>
> I think we can use the rewrite of the render and the template_exists?
> function to do all of this. What it would take is rewriting the render
> calls with a render_as call that did the check.
>
> Sergio, Cain, Kenny, What do you guys think?I have fixed it, in a similar way. I have overridden ActionView::PathSet.find_template, if it doesn't find a template in view paths, try to search in active_scaffold view paths. -- Sergio Cambra .:: entreCables S.L. ::. Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
