mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-29 05:51:22 +00:00
13 lines
265 B
Ruby
13 lines
265 B
Ruby
class LogEvent < ActiveRecord::Base
|
|
def self.get search, team = nil
|
|
if f = first({:conditions => {:name => search}})
|
|
return f
|
|
else
|
|
f = LogEvent.new
|
|
f.name = "get"
|
|
f.team = team if team
|
|
f.save
|
|
return f
|
|
end
|
|
end
|
|
end
|