Skip to content

Instantly share code, notes, and snippets.

@jpleau
Created April 29, 2013 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpleau/5485687 to your computer and use it in GitHub Desktop.
Save jpleau/5485687 to your computer and use it in GitHub Desktop.
model:
class Visit < ActiveRecord::Base
belongs_to :client
end
controller:
class VisitsController < ApplicationController
def edit
@visit = Visit.find(params[:id])
end
end
view (_visit.html.erb partial):
<% form_for [@client, @visite] do |f| %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment