Skip to content

Instantly share code, notes, and snippets.

@fabianoleittes
Created November 28, 2012 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabianoleittes/4161304 to your computer and use it in GitHub Desktop.
Save fabianoleittes/4161304 to your computer and use it in GitHub Desktop.
class ChassisFinder
def self.search(code)
Customer.joins(possessions: :chassis).
where(possessions: { core_chassis: { code: code }})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment