Permalink
Browse files

allow symbol include's. include wants relation name not table.

  • Loading branch information...
zacheryph committed Feb 20, 2009
1 parent 235678d commit 1abfdc0a24ec8c89f3194aad975a0918f8a56344
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/suid_bit/relational_scope.rb
@@ -24,8 +24,8 @@ def with_relational_scope(parent_scope, relation, klass, scope, args)
# need to setup the includes to properly link
case options[:include]
- when Hash, Array
- options[:include] = [{klass.table_name => options[:include]}]
+ when Hash, Array, Symbol
+ options[:include] = [{relation => options[:include]}]
when NilClass
options[:include] = [relation]
end

0 comments on commit 1abfdc0

Please sign in to comment.