mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Merge pull request #289 from scambra/patch-1
use attribute name as symbol in hash, without table name, for activerecord scopes
This commit is contained in:
commit
f98d73442a
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ module AASM
|
|||
|
||||
def create_for_active_record(name)
|
||||
conditions = {
|
||||
"#{@klass.table_name}.#{@klass.aasm(@name).attribute_name}" => name.to_s
|
||||
@klass.table_name => { @klass.aasm(@name).attribute_name => name.to_s }
|
||||
}
|
||||
if ActiveRecord::VERSION::MAJOR >= 3
|
||||
@klass.class_eval do
|
||||
|
|
Loading…
Add table
Reference in a new issue