adnjoo / dueltasks

Gamify Your Tasks 👾
https://dueltasks.com/
MIT License
0 stars 0 forks source link

feat: multiplayer todos #133

Closed adnjoo closed 3 weeks ago

adnjoo commented 3 weeks ago

104

Summary of Pull Request

Changed Files:

  1. app/models/note.rb
    • Added methods for managing collaborators (add/remove).
    • Modified the association to belongs_to :owner, class_name: "User", foreign_key: :user_id.
    • Added has_many :notes_users and has_many :users, through: :notes_users.
  2. app/models/notes_user.rb
    • New model created with associations to Note and User.
  3. app/models/user.rb
    • Updated associations to include has_many :notes_users and has_many :notes, through: :notes_users.
    • Added has_many :owned_notes, class_name: "Note", foreign_key: :user_id.