<%= form_for(@image, :as => :image, :url => (@image.new_record? ? main_app.images_path : main_app.image_path), :method => (@image.new_record? ? :post : :put), :html => {:id=>"form_image", :class=>"mb-0 form-horizontal", :multipart => true, :target => "iframe_image"}) do |f| %>
<% end %>