Skip to content

Commit

Permalink
Add validations for job fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Druotic authored and Shanil Puri committed Sep 22, 2014
1 parent e9f5ee5 commit e9b94a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/job.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class Job < ActiveRecord::Base
has_and_belongs_to_many :tags
has_one :category

validates :owner_id, :title, :description, :category, :deadline, presence: true
end

0 comments on commit e9b94a8

Please sign in to comment.