Hmm.. that's what I thought too, but it appears that in fact it does not behave
this way, needing both a model name and a controller name name-spaced at the
same place.
When I switch to
= render :active_scaffold => 'admin/scaffold/blocks_pages', :params => { id:
nil }, :constraints => { :page_id => @record.id }
I get this error:
uninitialized constant BlocksPage
This is in spite of the fact that there exists a valid, working controller at
the exact namespace admin/scaffold/blocks_pages (which I know is working
because I can access it at its URL)
So in fact while it appears to want you to specify the controller, there is
something special about the path that makes active scaffold convert the string
"blocks_page" and look for a model named BlocksPage.
As an alternative, when I try to quadruple nest the controllers --- this does
not play nice with Active Scaffold
When I change what used to be my Admin::Scaffold::PagesController into a new
namespace for Admin::Scaffold::Platform::PagesController, I get this when I
load the index page on the AS controller:
No route matches {:action=>"show_search",
:controller=>"admin/scaffold/platform/pages"}
> On Feb 19, 2016, at 10:47 PM, Jim <[email protected]> wrote:
>
> When rendering an embedded scaffold, you specify the controller, not the
> object. So for example, to render the scaffold defined in
> Admin::PriceListsController as an embedded scaffold, I call it like this:
>
> <%= render(active_scaffold: 'admin/price_lists', constraints: { event:
> @event.id }, params: {id: nil} ) %>
>
> Jim Crate
>
> On Thursday, February 18, 2016 at 8:55:52 PM UTC-5, Jason FB wrote:
> I'm having some difficulty adding some namespacing to objects I use with
> ActiveScaffold
>
>
> I have a subview, shown here in haml, that works for a join table called
> blocks_pages. (It has a corresponding ruby object BlocksPage)
>
> = render :active_scaffold => 'blocks_pages', :params => { id: nil },
> :constraints => { :page_id => @record.id }
>
>
> I'd like to rename this object to Platform::BlocksPage, but when I do so, I
> get this:
>
> uninitialized constant BlocksPage
>
> I need a way to tell Active Scaffold that the object I want to use is the
> Platform::BlocksPage object, and not the BlockPage object. I tried various
> iterations of using the ruby object's name as the string passed to the
> :active_scaffold parameter, and also I tried 'platform/blocks_pages' but this
> did not work.
>
> Any suggestions?
> -Jason
>
>
>
>
>
>
> ----
>
> Jason Fleetwood-Boldt
> [email protected] <javascript:>
> http://www.jasonfleetwoodboldt.com/writing
> <http://www.jasonfleetwoodboldt.com/writing>
>
> If you'd like to reply by encrypted email you can find my public key on
> jasonfleetwoodboldt.com <http://jasonfleetwoodboldt.com/> (more about setting
> GPG: https://gpgtools.org <https://gpgtools.org/>)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ActiveScaffold : Ruby on Rails Gem" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/activescaffold
> <https://groups.google.com/group/activescaffold>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
----
Jason Fleetwood-Boldt
[email protected]
http://www.jasonfleetwoodboldt.com/writing
If you'd like to reply by encrypted email you can find my public key on
jasonfleetwoodboldt.com <http://jasonfleetwoodboldt.com/> (more about setting
GPG: https://gpgtools.org)
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.