Class: Commit
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Commit
- Defined in:
- app/models/commit.rb
Instance Method Summary (collapse)
Instance Method Details
- (Object) find_or_create(options = {})
9 10 11 12 |
# File 'app/models/commit.rb', line 9 def find_or_create(={}) commit = Commit.where(:sha => [:sha]).first !commit.blank? ? commit : Commit.create!() end |