My model:
def full_name
"#{first_name} #{middle_name} #{last_name} #{suffix_name}".mb_chars.upcase.squeeze(' ').strip
end
My rabl template:
collection @users
attributes :id, :full_name
This is inserting an extra child named wrapped_string
[{"user":{"id":73,"full_name":{"wrapped_string":"FOO BAR"}}}]
but I need something like:
[{"user":{"id":73,"full_name":"FOO BAR"}}]
If I don't use mb_chars
works great, but I must to use it. What should I do?