mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update users_show_hook_listener.rb
Cleaned up nil checks
This commit is contained in:
@@ -17,7 +17,7 @@ class UsersShowHookListener < Redmine::Hook::ViewListener
|
|||||||
QboEmployee.update_all
|
QboEmployee.update_all
|
||||||
|
|
||||||
# Check to see if there is a quickbooks user attached to the issue
|
# Check to see if there is a quickbooks user attached to the issue
|
||||||
@selected = context[:user].qbo_employee_id unless context[:user].qbo_employee_id.nil?
|
@selected = context[:user].qbo_employee.id if context[:user].qbo_employee
|
||||||
|
|
||||||
# Generate the drop down list of quickbooks contacts
|
# Generate the drop down list of quickbooks contacts
|
||||||
return "<p>#{context[:form].select :qbo_employee_id, QboEmployee.all.pluck(:name, :id), :selected => @selected, include_blank: true}</p>"
|
return "<p>#{context[:form].select :qbo_employee_id, QboEmployee.all.pluck(:name, :id), :selected => @selected, include_blank: true}</p>"
|
||||||
|
|||||||
Reference in New Issue
Block a user