Thanks Steve it's working... i have this hidden fields for adding
anothers sublessons and it's seems like it's generating some nasty
ids...if i want to create and update same time i have to make another
method i think....i 'm new to this business i'm struggle to learn the
conceps...i came from php wordpress and there are diferent stuff
<%= f.fields_for :sublessons do |sublesson_aa| %>
<div class="add_new_subtitle delete-subtitle-<%=hh%>"
style="padding-bottom: 25px;">
<%= sublesson_aa.label :sublesson_name, "Subtitle 1"
%></br>
<%= sublesson_aa.text_field :sublesson_name, class:
"form-control delete-sublesson-field-#{hh}", :value => ""%></br>
<%= sublesson_aa.label :sublesson_content, "Content" %></br>
<%=sublesson_aa.text_area 'sublesson_content', rows: 3,
class: "form-control delete-sublesson-content-#{hh}", :value =>
""%></br>
<%= sublesson_aa.label :sublesson_video_link, "Video link"
%><br>
<%= sublesson_aa.text_field :sublesson_video_link, class:
"form-control delete-sublesson-video-#{hh}", :value => "" %></br>
<a style="float:right" class="btn btn-primary"
id="remove_sublesson" onclick="remove_sublesson(<%=hh%>)">Delete
Sublesson</a>
<p style="display:none"><%= hh=hh+1%></p>
</div>
<%end%>