Sha256: 063c38096537c880fe7dc7ff6cb94f08896e20978e0d21fa9bc5d64e0bd95502

Contents?: true

Size: 259 Bytes

Versions: 7

Compression:

Stored size: 259 Bytes

Contents

gem "assistance", ">= 0.1.2" # because we need Validations

require "assistance"

module Sequel
  class Model
    include Validation
    
    alias_method :save!, :save
    def save(*args)
      return false unless valid?
      save!(*args)
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sequel-1.4.0 lib/sequel_model/validations.rb
sequel_model-0.5.0.2 lib/sequel_model/validations.rb
sequel_model-0.4 lib/sequel_model/validations.rb
sequel_model-0.5.0.1 lib/sequel_model/validations.rb
sequel_model-0.5 lib/sequel_model/validations.rb
sequel_model-0.4.1 lib/sequel_model/validations.rb
sequel_model-0.4.2 lib/sequel_model/validations.rb