hi guys,
Im working on getting 2 custom tables on admin users index and made 2
instance objects on the admin users controller this way
def index
hobo_index
@hospital_case_managers = User.find(:all, :conditions => {
:case_manager_type_id => CaseManagerType.find_by_name('Hospital').id })
@insurance_case_managers = User.where(:case_manager_type_id =>
CaseManagerType.find_by_name('Insurer').id)
end
and on index page im doing this
<content-body:>
<h4>Hospital Case Managers</h4>
<table-plus with="&@hospital_case_managers" fields="name, phonenopri,
phonenosec, email_address, hospital">
<empty-message:>No users match your criteria</empty-message:>
</table-plus>
<br />
<h4>Insurer Case Managers</h4>
<table-plus with="&@insurance_case_managers" fields="name, phonenopri,
phonenosec, email_address, insurer">
<empty-message:>No users match your criteria</empty-message:>
</table-plus>
</content-body:>
and i get this error called "Undefined method member_class for Nil:nil "
I replaced the same table plus with the code to pull objects from the view
directly this way
<table-plus with="&User.find(:all, :conditions => { :case_manager_type_id
=> CaseManagerType.find_by_name('Hospital').id })" fields="name,
phonenopri, phonenosec, email_address, hospital">
<empty-message:>No users match your criteria</empty-message:>
</table-plus>
<table-plus with="&User.find(:all, :conditions => { :case_manager_type_id
=> CaseManagerType.find_by_name('Insurer').id })" fields="name, phonenopri,
phonenosec, email_address, insurer">
<empty-message:>No users match your criteria</empty-message:>
</table-plus>
What should my code be if im planning to pull the object from the
controller and not at the view ?
Thanks
Vivek
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/CiDiGsLPaJoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.