Created
May 28, 2009 22:10
-
-
Save AlexJWayne/119611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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