Forum: Ruby on Rails How use variable in action List?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ccf0f43fe1adcaf0992e9576f0eb4494?d=identicon&s=25 Marcelo Junior (mr_brownstone)
on 2007-01-22 19:19
this is my action list:
  def list
       lista = session[:usuario].empresa.obras.find(:all, :conditions =>
['concluida = 0 and publica = 1 or usuario_id = ?', session[:usuario]])
       @obra_pages, @obras = paginate lista, :per_page => 10

however, appear this error message:
"#<Obra:0x46ffb90>#<Obra:0x46ff5a0>" is not a valid constant name!

Now the question. How make for using "@obra_pages, @obras = paginate
lista, :per_page => 10" in place of "@obra_pages, @obras = paginate
:obras, :per_page => 10"
This topic is locked and can not be replied to.