```ruby
class Ability
  include CanCan::Ability

  def initialize(user)
    user ||= User.new
    can :update,                     Club,   :user_id => user.id
    can [ :create, :edit, :update ], Course, :club_id => user.clubs.first.id # TODO: Figure out how to restrict to course_id in user.clubs.map(&:id)
  end
end
```

Update Ability for Lesson create
user
```ruby
class Ability
  include CanCan::Ability

  def initialize(user)
    user ||= User.new

    can :update, Club, :user_id => user.id

    can [ :create, :edit, :update ], Course do |course|
      course.user == user
    end

    can :create, Lesson do |lesson|
      lesson.user == user
    end
  end
end
```
assistant