rails has_one methods code example Example: active record dependent destroy has_many :books, dependent: :destroy