No method error - nil object

Thanks..
Well, I figured it out after I posted it on forum...
While I know why passing parameter is working, I don't understand why
first approach didn't work. Any clues?

Priya Buvan wrote:

You didn't mention the id of the topic which you are trying to show..
Also where you have created @topic object?

your first aproach was this:

def show
  @topic = @object
  @items = @topic.items
end

where would @object come from. it's a new uninitialized variable (=
nil). that's the reason it didn't work.
what else did you expect than nil.items ?