Got the same problem with the text box. Solved by duplicating the encoder and editing its OID.
text_coder = client.type_map_for_results.coders.find { |c| c.name == 'text' } new_coder = text_coder.dup.tap { |c| c.oid = 19 }
How did I get there: this may interest the next guy if the problem is similar, but not identical.
I read other people on the net talking about type_map_for_results , but how they didnβt know how to determine the encoder. Since this was a text box in my case, I decided to try cloning an existing one. I knew that I could find the Rails text preinstalled application, so I opened the rails console and searched for:
adapter = ActiveRecord::Base.connection connection = adapter.instance_variable_get("@connection") mapping = connection.type_map_for_results cd mapping
So, I put together the code in the solution. Tried it and it worked.
It was not easy to find, so I decided to exit lurker mode and share it with SO. Thereby: thanks @Andreyy for me :)
[ pry cd and ls ]
Giuse
source share