Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created May 8, 2013 14:25
Show Gist options
  • Select an option

  • Save Heavyblade/5540798 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/5540798 to your computer and use it in GitHub Desktop.
def show
render(:template => 'pages/no_exist', :status => 404, :layout => 'application') and return unless @user.present?
@skillsets = @user.skillsets.no_performer.all
@histories = @user.sorted_history
@profile = @user.profile
if current_user == @user and !@profile.present?
session[:wizard] = true
redirect_to dashboard_path
return
end
if logged_in? && current_user.id != @user.id && @user.present? && @user.profile.present?
@user.profile.viewed_by current_user
end
@notes_count = logged_in? ? current_user.notes.where(:target_id => @user.id).count : 0
render :layout => 'application'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment