Newbie question: want to following code to migrate to formtastic: <% f.fields_for :assets do |asset_fields| %> <% if asset_fields.object.new_record? %> <p> <%= asset_fields.file_field :asset %> </p> <% end %> <% end %> tried this: f.inputs "Appartment Details" do f.input :assets do |asset_fields| asset_fields.file_field.input :asset, :as => :file end end there is no upload button available. What i am doing wrong? Grtz..Swoany -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Remco Swoany wrote in post #1025137:> tried this: > > f.inputs "Appartment Details" do > f.input :assets do |asset_fields| > asset_fields.file_field.input :asset, :as => :file > end > end > > there is no upload button available. What i am doing wrong? > > Grtz..SwoanyHi, were you able to solve this? I''m having the same issue. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Remco Swoany wrote in post #1025137:> tried this: > > f.inputs "Appartment Details" do > f.input :assets do |asset_fields| > asset_fields.file_field.input :asset, :as => :file > end > end > > there is no upload button available. What i am doing wrong?You need to include f.buttons in order to be able to submit, so... f.inputs "" do f.input do || ... end f.buttons end -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Seemingly Similar Threads
- paperclip model fails while when updating with no attachment
- Multiple custom CSS for Formtastic
- How to avoid an attribute without passing it to post in formtastic
- formtastic does not save at all
- What is Formtastic and SimpleForm gem ? Is any one of this is by default included in Rails ?