I have a Ruby on Rails web app where users creates notes. The note belongs to the user that created it. 

I installed the [Pundit gem](https://github.com/elabs/pundit#installation) to create authorizations, specifically an admin role. 

I would like for a user to be able to:

* create, update, or delete *their* notes

And for an admin to be able to do the same for **any user's** notes.

When I log in as an admin, I can create a new note. When I log in as a member, I cannot create a new note. I get instantly redirected to the root page, and never even brought to the new note page.

Here is the flash error message I receive:

```
not allowed to new? this #<Note:0x007fe2ca17bc18>

```

Before installing Pundit, members **were** able to create a new note. So I assume it has something to do with my policies.

Here are the relevant methods from my `application_policy.rb` file:

```
  def index?
    false
  end

  def show?
    scope.where(:id => record.id).exists?
  end

  def create?
    user.present?
  end

  def new?
    create?
  end

  def update?
    user.present? && (record.user == user || user.admin?)
  end

  def edit?
    update?
  end

  def destroy?
    update?
  end

```

Here is my `note_policy.rb` file:

```
class NotePolicy < ApplicationPolicy

  def create?
    user.present? && (record.user == user || user.admin?)
  end

  def new?
    create?
  end

  def update?
    create?
  end

  def destroy?
    update?
  end

end

```

And here are the relevant actions from my `notes_controller.rb` file:

```
  def new
    @note = Note.new
    authorize @note
  end

  def create
    @note = Note.new(notes_params)
    @note.user = current_user
    authorize @note
    if @note.save
      redirect_to notes_path
    else
      render :new
    end
  end

```

I am trying to figure out why an admin can create a new note, but a member cannot.

Thank you.