Partial Problems

Hey guys,

I’m having a little trouble working out partials.
I have successfully made a partial work in my list.rhtml, but as I see
it on
the 15min introductry video. They guy uses one partial on multipul

At the moment I am trying this in my show.rhtml, I write <%= render
=> “journal” %> and I get this.

NoMethodError in Write#show

4: <%= %>

Trace of template inclusion: /app/views/write/show.rhtml

RAILS_ROOT: C:/source/lifejournal/public/…/config/…

If anyone has any answers, please help a n00b.


I’d venture to guess that @write is a single ActiveRecord object, not
a collection.

If it is a collection, you should have named it @writes, at the
very least.

Note: It’s not the naming that caused me to suggest the problem, but
it’s a
separate rant of its own. :slight_smile:

– Tom M.

Hi Tom,

Just one problem with that, every time I rename it to @writes. I get a
error on all my partials.


Must be a keyword collision.

Pick a different name. :slight_smile:

– Tom M.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs