Displaying 3 results from an estimated 3 matches for "nested_form".
2011 Jul 16
0
nested_form gem don't work for accepts_nested_attributes_for :limit
...class Post < ActiveRecord::Base
has_many :image, :dependent => :destroy
accepts_nested_attributes_for :image, :allow_destroy => true, :limit
=> 4
end
class Image < ActiveRecord::Base
belongs_to :Post
... paperclip settings ...
end
And the form view for the post is:
<%= nested_form_for @post, :html => { :multipart => true } do |f| %>
<%= f.fields_for :images do |i| %>
<% if i.object.new_record? %>
<%= i.file_field :photo %>
<% else %>
<%= image_tag(i.object.photo.url(:thumb)) %>
<% end %>
<%= i.link...
2011 Aug 17
3
file uploading controller
how to upload a video,document and a audio (of any format) within the
same controller and within the same form?
is it possible to do that?
if not then what is the solution?
--
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 post to this group, send email to
2011 Oct 26
6
Add an index to a form
Hello,
I''m having some trouble with forms, my app allows to enter data by
using a multi-step form that has 7 steps.
There are 3 steps that may let the user to add 1 form, for example
there''s a step called "children"
and that children has the following fields:
* name
* age
* gender
but one father may have more than 1 child and I''m adding another form
with