For the following example I want to retrieve the last 10 LastEntries for
experis_date >= now.
class User < ActiveRecord::Base
:include => “last_entries”,
:conditions => “last_entries.expires_date >= now()”,
:order => "id desc", :limit => 10)
class LastEntrie < ActiveRecord::Base
Rails tells me the following:
Mysql::Error: #42S02Unknown table ‘last_entries’ in where clause: SELECT
users WHERE (last_entries.expires_date >= now()) ORDER BY id desc
I was expecting to see here an inner join or something. Then I tried
:include and rails gave the following error:
uninitialized constant LastEntries
I would apreciate any tip on this subject.
Thanks for you attention,