Skip to content

Instantly share code, notes, and snippets.

@flexd
Created December 31, 2008 16:20
Show Gist options
  • Save flexd/42046 to your computer and use it in GitHub Desktop.
Save flexd/42046 to your computer and use it in GitHub Desktop.
def self.find_or_load_by_name(name)
if name.downcase == "none" then return nil end
alliance = self.find_by_name(name)
if !alliance
self.do_update
alliance = self.find_by_name(name)
end
return alliance
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment