Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Unabled to move the partial to a shared location #4

Open
rnhurt opened this issue Sep 24, 2009 · 1 comment
Open

Unabled to move the partial to a shared location #4

rnhurt opened this issue Sep 24, 2009 · 1 comment

Comments

@rnhurt
Copy link

rnhurt commented Sep 24, 2009

I am using add_child_link() in several places around my project to add a common "address" partial, however when I try to move it to a central location (/app/views/shared/_address.erb) I get the following error:

  You have a nil object when you didn't expect it!
  The error occurred while evaluating nil.klass

I tried to something like add_child_link "Add an address", f, :options => { :partial => "shared/address" } but it didn't help.

What is the recommended way to use this with partials that have a different path or name?

@ryanb
Copy link
Owner

ryanb commented Sep 26, 2009

The add child link method does not take an options hash, so I should probably adjust this so it does. Thanks for the suggestion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants