mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 17:31:27 +00:00
4199062a9c
Added model annotations
25 lines
506 B
Ruby
25 lines
506 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: log_events
|
|
#
|
|
# id :integer not null, primary key
|
|
# name :string(255)
|
|
# description :string(255)
|
|
# team :integer
|
|
# created_at :datetime
|
|
# updated_at :datetime
|
|
#
|
|
|
|
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
|