cowtech-rails 1.7.9.0 → 1.8.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -144,8 +144,8 @@ module Cowtech
144
144
  self.crud_query_initialize(data) unless data[:query_initialized]
145
145
  parameter = :search unless parameter
146
146
 
147
- self.crud_query_add_condition(data, "(#{self.crud_get_class(data).table_name}.#{self.crud_get_class(data).deleted_column} = :deleted)", {:deleted => false}) unless data[:skip_deleted]
148
-
147
+ self.crud_query_add_condition(data, "(#{self.crud_get_class(data).table_name}.#{self.crud_get_class(data).deleted_column} IS NULL)", {}) unless data[:skip_deleted]
148
+
149
149
  # GET QUERY
150
150
  args = params[parameter] unless args
151
151
 
@@ -9,7 +9,7 @@ module Cowtech
9
9
  module Models
10
10
  class ModelBase < ::ActiveRecord::Base
11
11
  def self.deleted_column
12
- "deleted"
12
+ "deleted_at"
13
13
  end
14
14
 
15
15
  def self.status_column
@@ -40,7 +40,7 @@ module Cowtech
40
40
  if !definitive then
41
41
  if self.deletable? then
42
42
  if self.has_attribute?(self.class.deleted_column) then
43
- self.update_attribute(self.class.deleted_column, true)
43
+ self.update_attribute(self.class.deleted_column, DateTime.now)
44
44
  true
45
45
  elsif self.has_attribute?(self.class.status_column) then
46
46
  self.update_attribute(self.class.status_column, self.deleted_status)
@@ -8,8 +8,8 @@ module Cowtech
8
8
  module Rails
9
9
  module Version
10
10
  MAJOR = 1
11
- MINOR = 7
12
- PATCH = 9
11
+ MINOR = 8
12
+ PATCH = 0
13
13
  BUILD = 0
14
14
 
15
15
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.9.0
4
+ version: 1.8.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: