<%= form_for version, html: ajax_form_hash(dom_target(version.post, :preview_version)).merge( class: 'pulitzer-form-left' ) do |f| %> <%= f.submit "Activate", data: {prevent_double_click: true} %> <%= hidden_field_tag :status, :active %> <% end %> <%= form_for version, html: ajax_form_hash(dom_target(version.post, :preview_version)).merge( class: 'pulitzer-form-left' ) do |f| %> <%= f.submit "Abandon", data: {prevent_double_click: true} %> <%= hidden_field_tag :status, :abandoned %> <% end %> <% if version.post.active_version %> <%= form_for version.post.active_version, html: ajax_form_hash(dom_target(version.post, :preview_version)).merge( class: 'pulitzer-form-left' ) do |f| %> <%= f.submit "Unpublish", data: {prevent_double_click: true} %> <%= hidden_field_tag :status, :abandoned %> <% end %> <% end %>