show only notes for current user

hi, i've written an app but failing on one pivotal part,

i have a user model built, and a notes model built

now, once the user navigates to the notes view they can create notes and they will only be available to that user.

i've got it saving the user_id to the note record, but not filtering out only notes for that current user.

any ideas?

sample code

<% for note in @notes %>   <tr>   <% for column in Note.content_columns %>     <td><%=h note.send(column.name) %></td>   <% end %>     <td><%= link_to 'Show', :action => 'show', :id => note %></td>     <td><%= link_to 'Edit', :action => 'edit', :id => note %></td>     <td><%= link_to 'Destroy', { :action => 'destroy', :id => note }, :confirm => 'Are you sure?', :method => :post %></td>   </tr> <% end %>

filter it in the controller:

def show   @notes = Note.find(:all, :conditions => ["user_id = ?", @current_user.id] end

filter it in the controller:

def show @notes = Note.find(:all, :conditions => [“user_id = ?”, @current_user.id] end

Or to use the has_many :notes association in the User model

def show @notes = @current_user.notes end

ah yes, even better!