Thanks Sam.  I will make these adjustments.  I figured a before_action
would be the right call, but just got it to work how I was used to it first.

Tom Corley
617-244-4394
4 Powder Mill Road
Sudbury, MA 01776
On Oct 12, 2013 12:21 PM, "Sam McTaggart" <notifications@github.com> wrote:

> In app/controllers/notes_controller.rb:
>
> > @@ -1,2 +1,32 @@
> >  class NotesController < ApplicationController
> > +
> > +  def index
> > +  end
> > +
> > +  def new
> > +    @nutshell = Nutshell.find(params[:nutshell_id])
> > +    @note = @nutshell.notes.build
> > +  end
> > +
> > +  def create
> > +    @nutshell = Nutshell.find(params[:nutshell_id])
> > +    @note = @nutshell.notes.build(note_params)
> > +    if @nutshell.user == current_user
>
> you probably want there to be a current user check inside of a before
> action. look at before_actions here
> http://guides.rubyonrails.org/action_controller_overview.html
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mgidea/thynkdup/pull/5/files#r6932157>
> .
>