Unable to render :active_scaffold partials #55

Closed
davesmylie opened this Issue Dec 23, 2010 · 4 comments

Projects

None yet

3 participants

@davesmylie

I'm using the current head from git (along with the forked render_component etc)
Active scaffold is working when I load a stand alone controller, but whenever I try to render it from a view, eg:

<%= render :active_scaffold => 'admin/agent' -%>

I get the following error:
ActionView::Template::Error (undefined method `formats' for nil:NilClass):
1: = render :active_scaffold => 'admin/agent'
app/views/test/index.haml:1:in _app_views_test_index_haml__226741202_88287490_654131706'

I'm not sure if this is a bug in the fork or with Rails 3, but this was working previously on Rails 2.3 and the current main active scaffold branch.

For some reason, rails isn't giving a decent stack trace of where in active scaffold the error is occurring, so let me know if there
any other information I could provide to help track the cause of this down.

Cheers
Dave Smylie

@vhochstein
Owner

Can you please try a controller which is nt namespaced?

undefined method formats might be happening in method list_formats in action 'list'.
Would be great if you could check by adding debug statements.

At least I can tell you that it is working for me with a plain controller. A further difference is that you are using haml... But let s check step by step to find out the root cause.

@davesmylie

Ok - I've been booted out of the office for the holidays, but will try both of those things first thing when I return and let you know.

I'm pretty sure I tried both haml and erb with the same results but I'll check that and confirm as well

Cheers
Dave smylie

@davesmylie

Can confirm this is now working with the changes to haml's action_view_mods.rrb as suggested by tlatim.

I guess that makes this one a haml issue. Thanks for your help =)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment