I can see all json objects in the browsers console intact, so I know for a fact that even after being passed into the template, the JSON comment object contains user object.
Is it possible HAMLC has a problem reaching nested attributes, or am I doing something plain wrong here?
Okay, I'm being an idiot twice during one day.
Wow :flushed:
The problem lied in RABLs structure that encapsulates all comment's attributes within comment attribute, god I hate that, that is so not Ruby.
The Rabl-generated JSON passed to HAMLC template looks as follows
And the HAMLC template looks like this
But I receive a javascript error
Cannot read property 'login' of undefined
. However when I change my HAMLC toI can see all json objects in the browsers console intact, so I know for a fact that even after being passed into the template, the JSON
comment
object containsuser
object.Is it possible HAMLC has a problem reaching nested attributes, or am I doing something plain wrong here?