I explored this more. The results are somewhat mysterious to me - I think
this is either a bug, or something that should be documented better.
def index
hobo_index current_user.events
end
doesn't work.
def index
@events = Event.find(:all, :conditions => ["user_id = ?",current_user.id])
end
does work.
On Jan 31, 2011, at 4:24 PM, Matt Jones wrote:
>
> On Jan 31, 2011, at 3:17 PM, Mark Sobkowicz wrote:
>
>> I have a table-plus view, with a controller
>>
>> def index
>> hobo_index current_user.events
>> end
>>
>> If the user has no events, the page gives an error:
>>
>> wrong model name: "" (extracted from translation key:
>> ".collection.empty_message"). You might want to use the translate/t
>> tag/method instead.
>>
>> If the default index controller is used, and there are no events, the
>> table-plus renders "No events to display". What is causing this? I don't
>> know how to use the t tag inside the table-plus.
>
> It looks like current_user.events is returning something that returns nil for
> member_class. I swear there was something similar a while back, but I can't
> seem to find it...
>
> --Matt Jones
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
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.