Forum: Ruby on Rails Re: Howto change @article.article.headline to @article.headl

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
albert ramstedt (Guest)
on 2006-02-06 15:25
(Received via mailing list)
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 topic is locked and can not be replied to.