Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def user_id
- if @current_user
- @current_user.id
- else
- nil
- end
- end
- def show
- @article = Article.viewable(user_id).find(params[:id])
- @blog = @article.blog
- @recentArticles = @blog.articles.published(:all, :limit=>5, :conditions=>"id!=#{@article.id}")
- @topics=@article.topics.find(:all, :limit=>5)
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @article }
- end
- end
Add Comment
Please, Sign In to add comment