Updated validations of map
to prevent 2 maps with the same sha1 refs #16
This commit is contained in:
@@ -25,7 +25,8 @@ class Map < ActiveRecord::Base
|
||||
|
||||
require 'digest/sha1'
|
||||
|
||||
validates_presence_of :map, :package, :build
|
||||
validates_uniqueness_of :map
|
||||
validates_presence_of :map, :build, :package
|
||||
|
||||
def self.save(p)
|
||||
map = Map.new
|
||||
|
||||
Reference in New Issue
Block a user