How use variable in action List?

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
end

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 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