parent
2e866fbac4
commit
4099771b1b
@ -0,0 +1,10 @@
|
|||||||
|
module ProjectAble
|
||||||
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
included do
|
||||||
|
has_many :projects, -> { order(position: :asc) }
|
||||||
|
end
|
||||||
|
|
||||||
|
module ClassMethods
|
||||||
|
end
|
||||||
|
end
|
@ -1,3 +1,5 @@
|
|||||||
class ProjectCategory < ApplicationRecord
|
class ProjectCategory < ApplicationRecord
|
||||||
|
include ProjectAble
|
||||||
has_ancestry
|
has_ancestry
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
class ProjectLanguage < ApplicationRecord
|
class ProjectLanguage < ApplicationRecord
|
||||||
|
include ProjectAble
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue