Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def profile
- @can_edit = @user == current_user
- @title = "Gamer - " + @user.display_name
- @friends = @user.friends.all :order => "friends.created_at", :limit => 8
- @games = @user.games.active.all :limit => 8
- @platforms = @user.platforms.all :limit => 8
- @articles ||= @user.published_articles.paginate(:per_page => 10, :page => params[:articles_page])
- @article_count ||= @articles.total_entries
- @comments = @user.comments.paginate :order => "created_at DESC", :page => 1, :per_page => 20
- render :action => "profile"
- end
- def page_articles
- @articles = @user.published_articles.paginate(:per_page => 10, :page => params[:page])
- @article_count = @articles.total_entries
- if request.xhr?
- render :partial => "gamer/articles_page", :locals => {:articles => @articles, :articles_url => gamer_profile_articles_nopage_url(:gamer => @user.token)}
- else
- profile
- end
- end
Add Comment
Please, Sign In to add comment