No commit activity in last 3 years
No release in over 3 years
ActiveModel validation that two associated models are related to each other.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0.0
 Project Readme

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'