Formtastic / activeadmin

Newbie question:

want to following code to migrate to formtastic:

<% f.fields_for :assets do |asset_fields| %>

<% if asset_fields.object.new_record? %>

<%= asset_fields.file_field :asset %>

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

Remco S. 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…Swoany

Hi, were you able to solve this? I’m having the same issue.

Remco S. 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs