Skip to content
Snippets Groups Projects
Commit 5cd49a38 authored by pabois's avatar pabois
Browse files

close #184

parent a1439e3f
No related branches found
No related tags found
Loading
......@@ -2,6 +2,7 @@ module WithSlug
extend ActiveSupport::Concern
included do
validates :slug, presence: true
validate :slug_must_be_unique
validates :slug, format: { with: /\A[a-z0-9\-]+\z/, message: I18n.t('slug_error') }
......
......@@ -37,6 +37,7 @@ class Research::Journal::Article < ApplicationRecord
include WithGit
include WithBlobs
include WithPosition
include WithSlug
has_summernote :text
has_one_attached :pdf
......
......@@ -28,8 +28,9 @@
#
class Research::Journal::Volume < ApplicationRecord
include WithGit
include WithFeaturedImage
include WithBlobs
include WithFeaturedImage
include WithSlug
belongs_to :university
belongs_to :journal, foreign_key: :research_journal_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment