simple_form or formtastic Input type for hstore

formtastic, hstore, ruby-on-rails, simple-form

Solution

You may use like this for input as hstore:

 <%= simple_form_for @product do |f| %>
   <%= f.simple_fields_for :attributes do |d| %>
       <% f.object.attributes.try(:each) do |key, value| %>
          <%= d.input key, :input_html => {:value => value } %>
       <% end %>
   <% end %>
<% end %>

Problem

Does anybody know any simple_form or formtastic input for hstore? I tried to search for any input but I didn't find any yet... It seems that the hstore field type is not yet supported... I would need it...

Original source