ruby on rails - Associations with simple_form an input field (not checkboxes, selects. or radios) -


I was hoping someone could help me with a simple_form association. What I want to do is to make one simple for a music video, which is a collaborator through many ways, my schema looks like this:

  create_table "music_videos" , Force: true do T | false t.string "url_id", empty: false t.integer "user_id", empty: wrong end create_table "music_videos_tags", id: false, force: true do | T | t.integer "music_video_id", null: false t.integer "tag_id", null: incorrect and add_indack "music_viewtit tag", ["music_video_id"], name: index_music_videos_tags_on_music_video_id ", using :: btree add_index" music_videos_tags " ["tag_id"], name: "index_music_videos_tags_on_tag_id" ,: btree create_table "tags", force: true do | t | t.string "name", null: false end   

music video Tags with many contrast tags: Tags: Contrary to music_video_tagsings, but I'm confused how to complete the affiliation with simple_form. I have a new html form, j े: & lt; h1 & gt; Your Video & lt; / h1 & gt; & lt;% = simple_form_for @music_video url: music_videos_path, method :: post | f |% & gt; & lt;% = f.input: song_title%> & lt;% = f.input: venue% & lt;% = f.input: description% & gt; & lt;% = f.input : Url_id, label & lt;% = f.input: location, label: "city", collection: music video :: CITY% & gt;: "Paste the URL ID 82237472"% & gt; & lt;% = f.input: name, label: "tag"%> & lt;% = f.submit% & gt;

Now I know, I think f.input: should be a union for name, but I do not want the checkbox, selection or radio. How can I do this? I thought about creating a form for both @music_videos, and the @ tags form at the top, but I do not think this would work. The errors I get are that an undefined method is the name. any idea? I was stuck on this for a while. Some help would be appreciated. Thank you.

Change

  <% = f.input: name , Label: "tag"%> With   

    in simple form for more information.   

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -