Skip to content

Instantly share code, notes, and snippets.

@fivetwentysix
Created November 29, 2010 06:54
Show Gist options
  • Select an option

  • Save fivetwentysix/719671 to your computer and use it in GitHub Desktop.

Select an option

Save fivetwentysix/719671 to your computer and use it in GitHub Desktop.
<% if params[:action] == "edit"
post_path = admin_carousel_path(:id => @carousel.id)
else
post_path = admin_carousel_index_path
end
%>
<% form_for(@carousel, :url => post_path, :html => {:multipart => true}) do |f| %>
<p>
<%= f.error_messages %>
</p>
<p>
<%= f.label :alternate_text %>
<%= f.text_field :alternate_text %>
</p>
<p>
<%= f.label :destination_url %>
<%= f.text_field :destination_url %>
</p>
<p>
<%= f.label :image %>
<%= f.file_field :image %>
</p>
<p>
<%= f.submit %>
</p>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment