Forked from lucasdavila/dynamic_form_for_hstore_attributes_in_rails.html.erb
Created
September 23, 2019 10:34
-
-
Save zzeroo/73c9e1631de233c6d2ca60d12158ded9 to your computer and use it in GitHub Desktop.
Dynamic form for hstore attributes in rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= 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 %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment