Skip to content

Commit

Permalink
[#721 state:resolved] LifecycleState breaks table-plus sorting (from
Browse files Browse the repository at this point in the history
Matt Jones)
  • Loading branch information
bryanlarsen committed May 20, 2010
1 parent 735471e commit 4c08240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hobo/lib/hobo/scopes/automatic_scopes.rb
Expand Up @@ -268,7 +268,7 @@ def create_scope
type = klass.attr_type(field)
if type.nil? #a virtual attribute from an SQL alias, e.g., 'total' from 'COUNT(*) AS total'
colspec = "#{field}" # don't prepend the table name
elsif type.respond_to?(:table_name) && (name = type.name_attribute)
elsif type.respond_to?(:name_attribute) && (name = type.name_attribute)
include = field
colspec = "#{type.table_name}.#{name}"
else
Expand Down

0 comments on commit 4c08240

Please sign in to comment.