Aha! Posting the full error text led me to read it more carefully.
There's a line in there that says:
app/helpers/listings_helper.rb:3:in `add_image_link'
Looked in add_image_link, which is a helper that dynamicall adds more
copies of the same partial. Needed to add the local variables there
too
Thanks for your help Bill,
The partial is in a folder called views/listings because it is shared
by two different models, ResidentialListing and CommercialListing,
both of which inherit (via STI) from a Listing model. The error is
occuring in Residential_listings#new because that is the template
I should also say that I have partial locals in other parts of my code
that are working fine, as in my edit.html.erb:
<%= render :partial => 'form', :locals => {:residential_listing =>
@residential_listing} %>
--~--~-~--~~~---~--~~
You received this message because
> Without seeing more code, I'd guess you're passing a local to that
> partial without passing the value you're assigning to the local to the
> view / partial above. But that's just a guess. Post some additional
> code for additional assistance.
Hi Bill,
I could certainly post more code, but f
> does
>
> <%= foo %>
>
> work?
Sorry that was a typo in my original message. I have <%= foo %> in my
partial and it doesn't work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post
I know I must be doing something dumb, but I can't seem to send a
local variable to my partial. The below code leads to the following
error:
NameError in Residential_listings#new
undefined local variable or method `foo' for #
I am trying to call the variable 'foo' in a partial called
_attachment
On Feb 12, 6:35 pm, Rob Biedenharn
wrote:
> On Feb 12, 2009, at 4:21 PM, Jamie Forrest wrote:
>
>
>
> > I want to create a record with a manually-set custom ID, for instance:
>
> > Foo.create(:id => 8000, :name =>"bar")
>
> > But when I try t
I want to create a record with a manually-set custom ID, for instance:
Foo.create(:id => 8000, :name =>"bar")
But when I try to do that, Rails ignores the id I pass and continues
to auto-increment the id in the table. So in other words the console
output is along the lines of:
>> Foo.find(:last
8 matches
Mail list logo