diff --git a/rails-trash.gemspec b/rails-trash.gemspec index a096d75..08f2cfa 100644 --- a/rails-trash.gemspec +++ b/rails-trash.gemspec @@ -1,12 +1,12 @@ Gem::Specification.new do |s| s.name = 'rails-trash' - s.version = '3.0.0' + s.version = '4.0.0' s.author = 'Francesc Esplugas' s.email = 'contact@francescesplugas.com' s.homepage = 'https://github.com/fesplugas/rails-trash' s.summary = 'Trash' - s.add_dependency('rails', '>= 3.2.12') + s.add_dependency('rails', '>= 4.0.1') s.add_development_dependency("factory_girl", "~> 4.2.0") s.add_development_dependency("sqlite3", "~> 1.3.7") diff --git a/test/rails-trash_test.rb b/test/rails-trash_test.rb index bfdc4c7..b336f6b 100644 --- a/test/rails-trash_test.rb +++ b/test/rails-trash_test.rb @@ -1,14 +1,3 @@ -module Rails - module VERSION - MAJOR = 3 - MINOR = 1 - TINY = 0 - PRE = "rc1" - - STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') - end -end - require 'test/unit' require 'rubygems' require 'active_record' @@ -56,7 +45,7 @@ class Site < ActiveRecord::Base class Entry < ActiveRecord::Base include Rails::Trash - default_scope where(arel_table[:deleted_at].eq(nil)) if arel_table[:deleted_at] + default_scope { where(arel_table[:deleted_at].eq(nil)) } if arel_table[:deleted_at] belongs_to :site has_many :comments, :dependent => :destroy @@ -64,7 +53,7 @@ class Entry < ActiveRecord::Base class Comment < ActiveRecord::Base include Rails::Trash - default_scope where(arel_table[:deleted_at].eq(nil)) if arel_table[:deleted_at] + default_scope { where(arel_table[:deleted_at].eq(nil)) } if arel_table[:deleted_at] belongs_to :entry end