diff options
Diffstat (limited to 'app/models/wiki.rb')
| -rw-r--r-- | app/models/wiki.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb index d9ec069d14b..3c4952cd291 100644 --- a/app/models/wiki.rb +++ b/app/models/wiki.rb @@ -1,10 +1,10 @@ class Wiki < ActiveRecord::Base belongs_to :project belongs_to :user - has_many :notes, :as => :noteable, :dependent => :destroy + has_many :notes, as: :noteable, dependent: :destroy - validates :content, :title, :user_id, :presence => true - validates :title, :length => 1..250 + validates :content, :title, :user_id, presence: true + validates :title, length: 1..250 before_update :set_slug |
