Re: Howto change @article.article.headline to @article.headl

If you want to use the exact same view, then I assume you just need the
Article objects. Then I would change your group action like this:

def group
id = params[:id]
article_groups = ArticleGroup.find(:all,
:include => [:group, :article],
:conditions => [“articles.un_published != ‘1’ and =
?”, id],
:order => “articles.created_on desc”)
@articles = article_groups.collect {|a| a.article}
render :action => ‘index’


Henrik Ormåsen wrote:

def group
in the index.rhtml view I get the stuff from the array with
@article.headline, @article.ingress

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