You've duplicated `StudentProfile.find(params[:id])` between this method and `your_child?`. Also, `your_child?` seems like it could be a method on either the parent or the child. What do you think about something like this?

```
def show
  @student = StudentProfile.find(params[:id])

  if @student.child_of(current_profile)?
    redirect_to root_path
  end
end
```