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?

-Mike

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • Vi... Mike Gaffney
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... Tys von Gaza
        • ... Tys von Gaza
        • ... Tys von Gaza
          • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
          • ... Enrico
          • ... Enrico
          • ... Jon Mischo
            • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

Reply via email to