[Rails-core] [3795] render_component doesn't work with modules?
Nathaniel S. H. Brown
nshb at inimit.com
Sat Feb 11 04:02:58 GMT 2006
I originally tried the render_component 'admin/blog', when viewing a page
within the 'admin/someothercontroller', and had the same issue. When I did
further tests, I found that both 'admin/blog' and '/admin/blog' replicated
the same error abut the inflector.
I haven't tried with edge, but was planning on later on this weekend as I
want to get RJS rolling.
Also, David, I just read on your archives, that you like to stick to the
"Release often" mantra. Any idea when 1.1 is coming? :) Would be great to
get the RJS templates by default.
-Nb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nathaniel S. H. Brown http://nshb.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -----Original Message-----
> From: rails-core-bounces at lists.rubyonrails.org
> [mailto:rails-core-bounces at lists.rubyonrails.org] On Behalf
> Of Trevor Squires
> Sent: February 10, 2006 8:32 AM
> To: rails-core at lists.rubyonrails.org
> Subject: Re: [Rails-core] [3795] render_component doesn't
> work with modules?
>
> Rick,
>
> I'm not sure that changeset is the issue. As I said before, a
> *leading* slash will give you problems.
>
> If you look at the stack trace (assuming I'm recreating
> Nathaniel's problem correctly) it says the error is thrown in
> Inflector#constantize.
>
> That bit of code expressly *forbids* leading :: characters in
> the constant name being resolved and you can see it in action
> in the console simply by typing:
>
> "/foo/bar".camelize.constantize
>
> I'm not sure, but I don't recall a leading '/' in a
> render_component call *ever* working for me...
>
> Regards,
> Trevor
>
> On 10-Feb-06, at 7:27 AM, Rick Olson wrote:
>
> > On 2/10/06, Trevor Squires <trevor at protocool.com> wrote:
> >> Hi Nathaniel,
> >>
> >> I'm using a version of edge (not the most recent, but after module
> >> namespace support was improved) and I use render_component into a
> >> module namespace quite extensively with no problems.
> >>
> >> I know you said you "nailed it down to having a '/' in the
> >> controller" but are you sure it's not simply the *leading* slash
> >> character that's giving you problems?
> >>
> >> Regards,
> >> Trevor
> >
> > This might be related to changeset [3563]
> > (http://dev.rubyonrails.org/changeset/3563). When I get some time
> > I'll dig into the issue if no one else has by then.
> >
> > --
> > Rick Olson
> > http://techno-weenie.net
> > _______________________________________________
> > Rails-core mailing list
> > Rails-core at lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails-core
>
> _______________________________________________
> Rails-core mailing list
> Rails-core at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-core
>
More information about the Rails-core
mailing list