Ruby on Rails Tuesday, August 19, 2014

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%>

Thanks!

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bd8fca53291ab2ee679b9c5d2e60eca8%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment