Skip to content

Commit

Permalink
named scopes now use table_name for prefixing aasm column in named. f…
Browse files Browse the repository at this point in the history
…ixed bug in combination with norman-friendly_id
  • Loading branch information
basiszwo committed May 12, 2009
1 parent baceb4b commit f9f07ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/persistence/active_record_persistence.rb
Expand Up @@ -238,7 +238,7 @@ def aasm_read_state
module NamedScopeMethods
def aasm_state_with_named_scope name, options = {}
aasm_state_without_named_scope name, options
self.named_scope name, :conditions => {self.aasm_column => name.to_s} unless self.respond_to?(name)
self.named_scope name, :conditions => { "#{table_name}.#{self.aasm_column}" => name.to_s} unless self.respond_to?(name)
end
end
end
Expand Down

0 comments on commit f9f07ff

Please sign in to comment.