Skip to content

Commit

Permalink
According to the test demodulize is not required here
Browse files Browse the repository at this point in the history
  • Loading branch information
semaperepelitsa committed Jan 30, 2012
1 parent e2cf96f commit 26c7900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/fields/mappings.rb
Expand Up @@ -25,7 +25,7 @@ def for(klass, foreign_key = false)
if klass.nil?
Internal::Object
elsif foreign_key
Internal::ForeignKeys.const_get(klass.to_s.demodulize)
Internal::ForeignKeys.const_get(klass.to_s)
else
modules = "BSON::|ActiveSupport::"
match = klass.to_s.match(Regexp.new("^(#{ modules })?(\\w+)$"))
Expand Down

0 comments on commit 26c7900

Please sign in to comment.