Skip to content

Instantly share code, notes, and snippets.

@AlexJWayne
Created May 28, 2009 22:10
Show Gist options
  • Save AlexJWayne/119611 to your computer and use it in GitHub Desktop.
Save AlexJWayne/119611 to your computer and use it in GitHub Desktop.
def uncool
facet = Facet.find_or_initialize_by_uri(@subject.uri)
facet.holo_field = @holo_field
facet.save
facet = Facet.find_by_uri(@subject.uri)
end
def way_cool
facet = @holofield.facets.find_or_create_by_uri(@subject.uri)
end
def uncool
@subject = Subject.find_or_create_by_uri(uri)
if not @holo_field.subjects.member?@subject then @holo_field.subjects << @subject
end
def slightly_cool
@subject = Subject.find_or_create_by_uri(uri)
@holo_field.subjects << @subject unless @holo_field.subjects.member?(@subject)
end
def way_cool
@subject = @holo_field.subjects.find_or_create_by_uri(uri)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment