If your plugin views must be used by all controllers which use AS, you can put 
your views in app/views/active_scaffold_overrides inside your plugin 
directory, and it should be used automatically.

El Monday 23 March 2009 22:41:08 Meech escribió:
> I just patched up my copy of active_scaffold_export to work with 2.3
> and found this to work...
>
> base.active_scaffold_paths << plugin_view_path

If your plugin views must be used only by some controllers, as in 
active_scaffold_sortable, you should use something like above line, but with 
that line you get view path added after active_scaffold paths. If you add 
some views is ok, but if you override some views from active_scaffold (I use 
it for some plugins calling render :super after that), your views won't be 
used.

The right way would be add the view path after active_scaffold overrides (so 
you can override in your application using 
app/views/active_scaffold_overrides):
base.class_eval do
        @active_scaffld_overrides << plugin_view_path
end

>
> nightrider wrote:
> > Now I see the post again.  Weird.  Anyway, does anyone know how to add
> > to the active_scaffold view paths for Rails.2.3.x  or do we now add
> > directly to the controllers view_paths?
> >
> > On Mar 18, 9:10 am, naaano <[email protected]> wrote:
> > > there was a message yesterday about some maintenance, and read-only
> > > over code.google
> > > but things look normal to me in here
> > >
> > > On Mar 17, 6:32 pm, Bassel Samman <[email protected]> wrote:
> > > > For some reason the post I posted earlier keeps disappearing from the
> > > > discussion list.  Is anyone having a similar issue with posting?
> > > >
> > > > On Tue, Mar 17, 2009 at 5:08 PM, nightrider <[email protected]> 
wrote:
> > > > > I've tried a bunch of things to add my view path to the
> > > > > active_scaffold paths in a plugin, but non seem to be working.  I
> > > > > know I can can add my views directly through my controllers
> > > > > view_paths, but I'm wondering how to access the active_scaffold
> > > > > views path variable. Also, is there a reason that you chose to
> > > > > continue to use your own view paths instead of having them be
> > > > > picked up by the new engines functionality for Rails 2.3?
> > > > >
> > > > > thanks
>
> 


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

  • Ho... nightrider
    • ... nightrider
      • ... Bassel Samman
        • ... naaano
          • ... nightrider
            • ... Meech
              • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

Reply via email to