Skip to content

Instantly share code, notes, and snippets.

@hidenowt
Created March 24, 2009 13:08
Show Gist options
  • Save hidenowt/84072 to your computer and use it in GitHub Desktop.
Save hidenowt/84072 to your computer and use it in GitHub Desktop.
<!-- new -->
<% @nome_pagina = 'Adicionar User' %>
<!-- o multipart é para informar que irá ser feito o carregamento/upload de um arquivo -->
<% form_for(@user, :html => { :multipart => true }) do |f| %>
<%= render :partial => "user", :locals => { :f => f } %>
<%= f.submit "Criar User" %>
<% end %>
<%= link_to 'Retornar', users_path %>
<!-- new -->
<!-- edit -->
<% @nome_pagina = 'Editar User' %>
<% form_for(@user, :html => { :multipart => true }) do |f| %>
<%= render :partial => "user", :locals => { :f => f } %>
<%= f.submit "Atualizar User" %>
<% end %>
<%= link_to 'Exibir', @user %> |
<%= link_to 'Retornar', users_path %>
<!-- edit -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment