In one part of my code, I write:
session['user_id'] = User.find_by_login(params['user_login']).id
logger.info "Login! - /#{session['user_id']}/,/#{session['user_login']}/"
and that works just fine.
In part of another module (a plugin which works just fine before the change), I write:
@#{singular_name}.user_id = session['user_id']
and that fails with the error:
can't convert String into IntegerWhich says to me that it doesn't like 'user_id' as the key into the session hash, but it's acting as if it thinks session is suddenly an array...?#{RAILS_ROOT}/vendor/plugins/ajax_scaffold_plugin-3.2.4/lib/ajax_scaffold_plugin.rb:283:in `[]'
But... the session dump shows that it's there:
---Must be something automagical...
user: !ruby/object:User
assets:
attributes:
id: "6"
password: 8b2f204be0bad5668fd1c89f8f25b5ea4106f057
login: rich
user_login: rich
return-to:
user_id: 6
asset:
:sort:
:page: "1"
:sort_direction: asc
flash: !map:ActionController::Flash::FlashHash {}
No comments:
Post a Comment