Hashie::mash getting malformed in transit from helper function to partial?

Hey all. I have the following:

  1. A partial function which basically tests to see which level the object is at.
    <% if defined? endpointobject.at(0).field_name != nil %>

  2. A helper function in my config.rb:
    helpers do def get_json_sample(endpointobject) partial "render_json_sample", :locals => { endpointobject => :endpointobject }; end end

  3. A Hashie::mash, data.payment_methods

  4. A template erb.

If I call the partial directly from the template erb, like so:
<%= partial "render_json_sample", locals: { endpointobject: data.payment_methods } %>
… the endpoint.inspect method works, everything looks good.

BUT if I call the helper function instead, like so:
<%= get_json_sample(data.payment_methods) %>
… I get an error RuntimeError at /
invalid locals key: [#<Hashie::Mash

Theoretically, shouldn’t these be producing the same output. One goes from A -> C, the other goes from A -> B -> C without touching the Hashie::mash.

An endpoint.inspect in my helper function reveals an appropriately-formed object, but it appears to get malformed in transit. Can anyone possibly shed some light into this for me?

Thanks very much,
Chris