Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Build Status

Rails 3 validation to ensure that two ActiveModel associations are related to each other.

class JobApplication
  belongs_to :resume
  belongs_to :user
  validates :resume, :belongs_to => :user
end

The validation checks that job_application.resume.user is the same as job_application.user.

Installation:

gem 'validates-belongs-to'

About

Rails 3 validation

Resources

Packages

No packages published

Languages

You can’t perform that action at this time.