Skip to content

Instantly share code, notes, and snippets.

@delba
Created May 25, 2013 16:16
Show Gist options
  • Select an option

  • Save delba/5649600 to your computer and use it in GitHub Desktop.

Select an option

Save delba/5649600 to your computer and use it in GitHub Desktop.
Select all association with dependent options
dependent_associations = Article.reflect_on_all_associations.select do |association|
association.options.has_key?(:dependent)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment