Subject: | maybe_many_link_views |
I was having some problems with maybe_many_link_views for certain has_many relationships. It seems to work ok for many-many relationships, but for one-many relationships, for some reason the @values argument ends up being an array, the first element of which is an array ref with the actual values.. so if you call Dumper(\@values), it looks something like
[
[
object1,
object2
]
]
So, I added this line right before the return statement:
@values = @{$values[0]} if(ref($values[0]) eq 'ARRAY');
Not sure what's going on.. just that this seems to fix it. Wonder if you see the same problem?