You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling rendering a partial a different template format, such as slim in my case, the render call needs to have #to_json called on it otherwise it returns a ruby hash instead of valid json. I didn't see any heads ups on this in the documentation so I'm not sure if this is intentional behavior or not.
For example, using jbuilder you can use something like this:
When calling rendering a partial a different template format, such as slim in my case, the render call needs to have
#to_json
called on it otherwise it returns a ruby hash instead of valid json. I didn't see any heads ups on this in the documentation so I'm not sure if this is intentional behavior or not.For example, using jbuilder you can use something like this:
whereas with jb you need this:
The text was updated successfully, but these errors were encountered: