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
>
> If you'd like to reply by encrypted email you can find my public key on
> 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.