]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-1.1.0/lib/composite_primary_keys/fixtures.rb
7dfaf08fb893b2bd8f9ac6dab93e11579b68466c
[rails.git] / vendor / gems / composite_primary_keys-1.1.0 / lib / composite_primary_keys / fixtures.rb
1 class Fixture #:nodoc:
2   def [](key)
3     if key.is_a? Array
4       return key.map { |a_key| self[a_key.to_s] }.to_composite_ids.to_s
5     end
6     @fixture[key]
7   end
8 end