Closed haslinger closed 8 years ago
Meanwhile a bit more details: The map method is missing in
activesupport (4.2.5) lib/active_support/hash_with_indifferent_access.rb
line 275.
It's a code line from 2013 and I don't get the details, why we haven't been dumping here forever.
The problem only occurs, if the string in the test evals to an ActiveRecord_Relation.
The quite similar looking case <repeat with="&this.lineitems">
is still fine, btw.
I have reproduced this. There is an error in HashWithIndifferentAccess, when having something a CollectionProxy as a value:
{:test => Foo.first.foobazs}.with_indifferent_access
This is the origin of this strange error. Fortunately, it has been fixed in Rails 5, so the next version of Hobo should have this problem fixed :).
I discovered that forcing the collection to load immediately using .all was my work-around.
See https://groups.google.com/d/topic/hobousers/m5ogxkOcRp0/discussion
Tim
I'm not sure, if this is a bug at all. But it could be useful to document the solution, so I just filed an issue anyways.
The error from the title came up in a dryml-template in the line:
I learned, that it can be fixed easily by using:
I'm not sure, if this is a change in Rails's standard behaviour, so I would like to hear a comment from some of you on this.