Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link to the User's tutorial page if they are signed in #49

Open
jendiamond opened this issue Sep 8, 2016 · 1 comment
Open

Add a link to the User's tutorial page if they are signed in #49

jendiamond opened this issue Sep 8, 2016 · 1 comment
Assignees
Labels

Comments

@jendiamond
Copy link
Owner

jendiamond commented Sep 8, 2016

In the _nav partial

<% if current_member %>
  <%= link_to 'My Tutorials' %>
<% end %>

In the controller/users_controller.rb

class UsersController < ApplicationController
  before_action :set_user, only: [:show, :edit, :update, :destroy]

  # GET /users
  def index
    @users = User.all
    @tutorials = Tutorial.all
    if current_member
      redirect_to user_tutorial
    end
  end

...
@jendiamond jendiamond self-assigned this Sep 8, 2016
@jendiamond jendiamond changed the title Sign up form doesn't reject wrong submissions Add a link to the User's tutorial page if they are signed in Sep 8, 2016
@jendiamond
Copy link
Owner Author

Actually we want to go directly to this page if they are signed in

#93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant