search for: entry_form

Displaying 3 results from an estimated 3 matches for "entry_form".

2011 Jul 25
4
[Rails 3.0.9] I have trouble about fields_for
...<%= form_for(@user) do |f| %> <div class="field"> <%= f.label :name %><br /> <%= f.text_field :name %> </div> <!-- Below the code doesn''t show up.(<%= f.fields ... <% end %>) --> <%= f.fields_for :entry do |entry_form| %> Title:<br/> <%= entry_form.text_field :title %> <% end %> <br/> <%= f.submit "Create" %> <% end %> # user.rb class Entry < ActiveRecord::Base belongs_to :user end # entry.rb class User < ActiveRecord::Base h...
2013 Mar 04
0
fields_for with accepts_nested_attributes: how to pass a value to a label
...cepts_nested_attributes_for :time_entries, reject_if: proc { |attr| attr[''worktime].blank? } end in the Timesheet ''new'' page: <%= form_for @timesheet do |f|%> <%= f.label :status%> <%= f.text_field :status %> <%= fields_for :time_entries do | entry_form| %> # how to display at this place the needed workdate for every time entry ? * <%= entry_form.label, value: ???? %>* <%= entry_form.text_field :worktime%> #worked time to be entered here as 0.5 or 1 day <% end%> <% end % Thanks and regards -- You received this...
2006 Apr 07
3
RJS removing content of div, but not div itself
..._link_tag "listdemo", :media => "all" %> </head> <body> <h3>Ingredient list</h3> <p> Enter the name and amount for each ingredient</p> <div class = "Entryline"> <%= render(:partial => ''entry_form'') %> </div> <div id=''my_list''> </div> </body> </html> ------------------ _entry_form.rhtml ------------------- <%= form_remote_tag(:update => ''my_list'', :url => {:action =...