Topic: Home work

Hi, 
   I have a home work. Can you help me out to solve?

1. Provide the models required
2. Each article can be related to many articles (or none). Provide code for making @article.related_articles work
3. Clean up the code according to rails conventions

class ArticleController < ApplicationController
  def show
    @article = Article.find(params[:id])
     if current_user.roles.map {|r| r.to_s}.include?('admin')
      @info = Info.find(:first, :conditions => "article_id = #{@article.id}")
    else
      @info = nil
    end

    if params[:show_comments] && params[:show_comments] != ''
      @comments = Comment.find(:first, :conditions => "article_id = #{@article.id}")
    end

    if !(params[:hide_related] && params[:hide_related] != '')
      @related_articles = @article.related_articles
    end
  end
end