[Bug] Can't display equipment list Error 500
knshiro opened this issue · comments
Just installed it and displayed an error coming from :
app/models/equipment_asset.rb line 39
def last_checkin_by
if asset_check_ins && asset_check_ins.last
asset_check_ins.last.name
else
"Unknown"
end
end
should be person instead of name
def last_checkin_by
if asset_check_ins && asset_check_ins.last
asset_check_ins.last.person
else
"Unknown"
end
end
I will get to this unless you have a pull request in which case I'll get to it sooner. Thanks. for finding the bug and a fix.
I looked into the source and none of it uses person
. The field is named name
. Has your database changed? I'm closing this for now.
Nope I didn't change anything. I'm on redmine 1.3 and I just git cloned from your repos, then migrated db with rake.
grep 'asset_check_in.person' * -R
gives me :
app/controllers/asset_check_ins_controller.rb: @asset_check_in.person ||= cookies[:asset_check_in_person] app/controllers/asset_check_ins_controller.rb: @asset_check_in.person = params[:person] app/controllers/asset_check_ins_controller.rb: cookies[:asset_check_in_person] = @asset_check_in.person app/views/asset_check_ins/new_iphone.rhtml: loclist_equipment_asset_asset_check_ins_path(@equipment_asset, :person => @asset_check_in.person, :location => location) %> app/views/asset_check_ins/loclist_iphone.rhtml: <%= hidden_field_tag :person, @asset_check_in.person %> test/functional/asset_check_ins_controller_test.rb: assert_equal "foo", cookies["asset_check_in_person"], "asset_check_in_person"