inline_forms 6.0.5 → 6.0.6

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7294976b3ac09b7775c3a0a36925ce4ccb4f73f
4
- data.tar.gz: 945113c29e712687c341ef479de35d5242096fca
3
+ metadata.gz: 54a5764d56a4e64abf5430fd36f3775b81948572
4
+ data.tar.gz: 8905f7da726c3130ad6b2be767447b6570e4a48d
5
5
  SHA512:
6
- metadata.gz: 68737c524ed39ab962da6e43b95ba051e453795dd7f03add546a1145eb44cbda13a7204c786649313fdcec04de70b96001b06f729e34aec55518d2fccef8fe04
7
- data.tar.gz: 2df74e31c2ee0b47e6d0d38c565cf889812e58c60ed851661db018b2140bb8955f2d084157c0c707a9b8086a8529953a691cc5098aa933c04e22f6a4e0d15a64
6
+ metadata.gz: 73efb75e7a5b9ca0d63925e903036201d4cbffa788dd39d81aff02ecc39ded8cdee0e5f6e5eab0754f8a37927b6b3d7169a9300fbc40c52d22c8670acf2bdde1
7
+ data.tar.gz: d5fac7a763a91cb96e9be78b83a97d8976b026ff8e38c6ead30c5acd680fa58ef2248a6011d1b600ecdd12b7e69e9b7171e680891baefcefb39a1849d6888e4b
@@ -185,7 +185,7 @@ class InlineFormsController < ApplicationController
185
185
  @update_span = params[:update]
186
186
  @object = referenced_object
187
187
  if current_user.role? :superadmin
188
- if (@Klass.soft_deletable? rescue false)
188
+ if (@object.soft_deletable? rescue false)
189
189
  @object.soft_delete(current_user)
190
190
  respond_to do |format|
191
191
  format.html { } unless @Klass.not_accessible_through_html?
@@ -198,7 +198,7 @@ class InlineFormsController < ApplicationController
198
198
  format.js { render :show_undo }
199
199
  end
200
200
  end
201
- elsif (@Klass.soft_deletable? rescue false)
201
+ elsif (@object.soft_deletable? rescue false)
202
202
  @object.soft_delete(current_user)
203
203
  respond_to do |format|
204
204
  format.html { } unless @Klass.not_accessible_through_html?
@@ -212,7 +212,7 @@ class InlineFormsController < ApplicationController
212
212
  def revert
213
213
  @update_span = params[:update]
214
214
  if current_user.role? :superadmin
215
- if (@Klass.soft_deletable? rescue false)
215
+ if (@object.soft_deletable? rescue false)
216
216
  @object = referenced_object
217
217
  @object.soft_restore
218
218
  respond_to do |format|
@@ -229,7 +229,7 @@ class InlineFormsController < ApplicationController
229
229
  format.js { render :close }
230
230
  end
231
231
  end
232
- elsif (@Klass.soft_deletable? rescue false)
232
+ elsif (@object.soft_deletable? rescue false)
233
233
  @object = referenced_object
234
234
  @object.soft_restore
235
235
  respond_to do |format|
@@ -14,21 +14,21 @@ module InlineForms::SoftDeletable
14
14
  # end
15
15
  # end
16
16
 
17
- def self.soft_deletable?
17
+ def soft_deletable?
18
18
  true
19
19
  end
20
20
 
21
21
  def soft_delete(current_user)
22
- deleted = 2
23
- deleter = current_user
24
- deleted_at = Time.current
22
+ self.deleted = 2
23
+ self.deleter = current_user
24
+ self.deleted_at = Time.current
25
25
  save
26
26
  end
27
27
 
28
28
  def soft_restore
29
- deleted = 1
30
- deleted_by = nil
31
- deleted_at = nil
29
+ self.deleted = 1
30
+ self.deleted_by = nil
31
+ self.deleted_at = nil
32
32
  save
33
33
  end
34
34
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "6.0.5"
3
+ VERSION = "6.0.6"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.5
4
+ version: 6.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares