Module: RailsDynamicAssociations
- Defined in:
- lib/rails_dynamic_associations.rb,
lib/rails_dynamic_associations/engine.rb,
lib/rails_dynamic_associations/version.rb
Defined Under Namespace
Modules: ActiveRecord Classes: Engine
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
Class Method Details
.opposite_directions ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/rails_dynamic_associations.rb', line 26 def self.opposite_directions directions.each_with_object({}) do |(key, value), hash| hash[key] = directions.values.find do |v| v != value end end end |