Skip to content

Commit

Permalink
Merge pull request #192 from loftwah/dl/links-broken-for-user
Browse files Browse the repository at this point in the history
link analytics to models
  • Loading branch information
loftwah authored Sep 21, 2024
2 parents 9829c33 + 4fe9a59 commit b868321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/achievement.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Achievement < ApplicationRecord
belongs_to :user
has_many :achievement_views
has_many :achievement_views, dependent: :destroy

validates :title, presence: true
validates :date, presence: true
Expand Down
2 changes: 1 addition & 1 deletion app/models/link.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Link < ApplicationRecord
belongs_to :user
has_many :link_clicks
has_many :link_clicks, dependent: :destroy

scope :visible, -> { where(visible: true) }
scope :pinned, -> { where(pinned: true) }
Expand Down

0 comments on commit b868321

Please sign in to comment.