Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

do not use id. that apparently causes activerecord to epicly fail int…

…o an infinite loop
  • Loading branch information...
commit 43fcdc64e9f1790419b9a2099efb3ae80d7c63d2 1 parent f87fb65
Andrew Coleman authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/restricted_subdomain_model.rb
View
3  lib/restricted_subdomain_model.rb
@@ -171,7 +171,8 @@ def calculate(*args)
def with_subdomain_scope(&block)
if subdomain_klass.current
- with_scope({ :find => { :conditions => ["#{table_name}.#{subdomain_symbol}_id = ?", subdomain_klass.current.id ] } }, :merge, &block)
+ subdomain_id = subdomain_klass.current[subdomain_klass.primary_key]
+ with_scope({ :find => { :conditions => ["#{table_name}.#{subdomain_symbol}_id = ?", subdomain_id ] } }, :merge, &block)
else
with_scope({}, :merge, &block)
end
Please sign in to comment.
Something went wrong with that request. Please try again.