Skip to content

Instantly share code, notes, and snippets.

@geektoo
Created August 16, 2011 02:51
Show Gist options
  • Save geektoo/1148350 to your computer and use it in GitHub Desktop.
Save geektoo/1148350 to your computer and use it in GitHub Desktop.
flights models
class Flight < ActiveRecord::Base
has_many :persons
accepts_nested_attributes_for :persons, :allors_destroy => true
end
class Person < ActiveRecord::Base
belongs_to :flights
has_attached_file :avatar
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment