I have to actions:
@articles = Article.find(:all,
:conditions => “un_published != ‘1’”,
:order => “created_on desc”)
id = params[:id]
@articles = ArticleGroup.find(:all,
:include => [:group, :article],
:conditions => [“articles.un_published != ‘1’ and groups.id =
:order => “articles.created_on desc”)
render :action => ‘index’
The last one will not work off course, because in the index.rhtml view
I get the stuff from the array with @article.headline,
@article.ingress etc. and in the group action I have to use
@article.article.headline etc. I really don’t want to write another
view just because of this difference.
How can I avoid it?