Sha256: a6e9f1f32459decb25a64a274fe60b7644b2c2b2c8b81311f0b7f3b8c4443f67

Contents?: true

Size: 308 Bytes

Versions: 14

Compression:

Stored size: 308 Bytes

Contents

module MongoMapper
  module Plugins
    module Associations
      module ClassMethods
        def find_association(name)
          name_association = self.associations.detect {|key, value| key.to_s == name.to_s}
          name_association ? name_association.last : nil
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mongoa-0.1.15 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.14 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.13 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.12 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.11 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.10 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.9 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.8 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.7 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.6 lib/mongoa/mongo_mapper/improvements/mongo_mapper_associations.rb
mongoa-0.1.5 lib/mongoa/mongo_mapper/associations.rb
mongoa-0.1.4 lib/mongoa/mongo_mapper/associations.rb
mongoa-0.1.2 lib/mongoa/mongo_mapper/associations.rb
mongoa-0.1.1 lib/mongoa/mongo_mapper/associations.rb