diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:07:50 +0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:25:15 +0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /app/models/wiki.rb | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
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 |