Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
andyklimczak committed Jan 9, 2019
1 parent 759fcb6 commit 2e3b3ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
sudo: false
language: ruby
before_install: gem update --system
before_install:
- gem update --system
- gem install bundler
cache: bundler
rvm:
- 2.2
Expand Down
6 changes: 2 additions & 4 deletions lib/paranoia.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
require 'active_record' unless defined? ActiveRecord

if [ActiveRecord::VERSION::MAJOR, ActiveRecord::VERSION::MINOR] == [5, 2]
require 'paranoia/active_record_5_2'
end
require 'paranoia/active_record_5_2'

module Paranoia
@@default_sentinel_value = nil
Expand Down Expand Up @@ -305,7 +303,7 @@ def build_relation(klass, *args)
class UniquenessValidator < ActiveModel::EachValidator
prepend UniquenessParanoiaValidator
end

class AssociationNotSoftDestroyedValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
# if association is soft destroyed, add an error
Expand Down
2 changes: 1 addition & 1 deletion paranoia.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|

s.add_dependency 'activerecord', '>= 4.0', '< 5.3'

s.add_development_dependency "bundler", ">= 1.0.0"
s.add_development_dependency "bundler", ">= 1.3.0"
s.add_development_dependency "rake"

s.files = `git ls-files`.split("\n")
Expand Down

0 comments on commit 2e3b3ad

Please sign in to comment.