Displaying 1 result from an estimated 1 matches for "rapture_post".
Did you mean:
rapture_posts
2006 Feb 23
2
find_by_sql aliasing issue when accessing attributes
I was recently having problems accessing attributes in an object. Can
somebody explain to me why this is, and if it is a bug?
I have the following code:
@archives = RapturePost.find_by_sql "select distinct
date_format(rapture_posts.date_created,''%Y-%m'') date_created from
rapture_posts where rapture_posts.site_id = 1 order by
rapture_posts.date_created desc"
I wish to loop through the contents of the object with the following:
for archive in archives
#do something with the contents of archive
end
W...