Skip to content

Instantly share code, notes, and snippets.

@khata-jp
Created April 21, 2020 11:17
Show Gist options
  • Save khata-jp/9ed268611817000c48de050aca44c975 to your computer and use it in GitHub Desktop.
Save khata-jp/9ed268611817000c48de050aca44c975 to your computer and use it in GitHub Desktop.
CTI
class Sire < ApplicationRecord
belongs_to :horse
accepts_nested_attributes_for :horse
default_scope { joins(:horse).select('*') }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment