cowtech-rails 1.4.0.0 → 1.4.1.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -45,11 +45,6 @@ module Cowtech
|
|
45
45
|
data[:pager_data]
|
46
46
|
end
|
47
47
|
|
48
|
-
def crud_get_form_data(data = nil)
|
49
|
-
# TODO: EH?
|
50
|
-
@record
|
51
|
-
end
|
52
|
-
|
53
48
|
def crud_get_data_bounds(data = nil)
|
54
49
|
data = self.crud_get_data unless data
|
55
50
|
data[:data_bounds]
|
@@ -253,10 +248,7 @@ module Cowtech
|
|
253
248
|
end
|
254
249
|
|
255
250
|
def crud_update_params
|
256
|
-
|
257
|
-
@agenda_update = params[:agenda_update]
|
258
|
-
blacklist = ["controller", "action", "id", "agenda_update"]
|
259
|
-
blacklist << "tipo" if self.class.name != "OrdiniController"
|
251
|
+
blacklist = ["controller", "action", "id"]
|
260
252
|
session["params-#{self.location_name}"] = (params.delete_if {|k,v| blacklist.include?(k) || params[k].is_a?(Tempfile)})
|
261
253
|
end
|
262
254
|
|
@@ -20,27 +20,8 @@ module Cowtech
|
|
20
20
|
true
|
21
21
|
end
|
22
22
|
|
23
|
-
# TODO: Internationalize this. :eliminato => :deleted, :stato => :status, Stato => Status
|
24
23
|
def delete(definitive = false)
|
25
|
-
|
26
|
-
if self.deletable? then
|
27
|
-
if self.respond_to?(:eliminato) then
|
28
|
-
self.eliminato = true
|
29
|
-
self.save
|
30
|
-
true
|
31
|
-
elsif self.respond_to?(:stato) then
|
32
|
-
self.stato = Stato[:eliminato]
|
33
|
-
self.save
|
34
|
-
true
|
35
|
-
else
|
36
|
-
super()
|
37
|
-
end
|
38
|
-
else
|
39
|
-
false
|
40
|
-
end
|
41
|
-
else
|
42
|
-
super(definitive)
|
43
|
-
end
|
24
|
+
super()
|
44
25
|
end
|
45
26
|
end
|
46
27
|
end
|
data/lib/cowtech/version.rb
CHANGED
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 4
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.4.0.0
|
10
|
+
version: 1.4.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shogun
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-10 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|