Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

render throws confusing exception when :partial is nil #3573

Closed
mscottford opened this Issue Nov 8, 2011 · 0 comments

Comments

Projects
None yet
2 participants

Invoking render :partial => nil, :locals => { :junk => Object.new } results in undefined methodmodel_name' for NilClass:Class`. I think it'd be better if the report was that the value for partial can't be nil.

I've created a sample project that simulates the setting that I found this issue in. It took me way too long to figure out that nil was getting passed in as the value for :partial. The sample project can be found at https://github.com/mscottford/rails-confusion.

@wycats wycats closed this in bc04455 Nov 19, 2011

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