mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
issue links
This commit is contained in:
25
app/models/pm_link.rb
Normal file
25
app/models/pm_link.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: pm_links
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# be_linkable_type :string(255) not null
|
||||
# be_linkable_id :integer not null
|
||||
# linkable_type :string(255) not null
|
||||
# linkable_id :integer not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_pm_links_on_linkable_id (linkable_id)
|
||||
# index_pm_links_on_linkable_type (linkable_type)
|
||||
#
|
||||
|
||||
class PmLink < ApplicationRecord
|
||||
belongs_to :linkable, polymorphic: true
|
||||
|
||||
def be_linkable
|
||||
be_linkable_type.constantize.find be_linkable_id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user