rails-ext 0.3.22 → 0.3.23
Sign up to get free protection for your applications and to get access to all the features.
- data/.git/COMMIT_EDITMSG +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +1 -0
- data/.git/logs/refs/heads/master +1 -0
- data/.git/logs/refs/remotes/origin/master +1 -0
- data/.git/objects/0c/d63588836394586cf3aec62339dba672e3fba1 +0 -0
- data/.git/objects/13/e52335ce37dcd3ef032f5187b5971114a21cfb +0 -0
- data/.git/objects/27/f64dfbca8c6e228425b7e63b48eed190d29780 +0 -0
- data/.git/objects/55/3b8cd5bc6a69c81af2f957445c7a381fdf7220 +0 -0
- data/.git/objects/79/b917ac5d56e3bffb0f63a9e3119ed32d638d42 +0 -0
- data/.git/objects/91/1c11ff0ad81999f73c5dee56c8f6241d3ac346 +0 -0
- data/.git/objects/e2/30f8b3acd20695be0a13fdd42aefa364ad1a4d +0 -0
- data/.git/refs/heads/master +1 -1
- data/.git/refs/remotes/origin/master +1 -1
- data/Rakefile +1 -1
- data/lib/rails_ext/action_controller/persistent_params.rb +19 -18
- metadata +9 -2
data/.git/COMMIT_EDITMSG
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
fix
|
data/.git/index
CHANGED
Binary file
|
data/.git/logs/HEAD
CHANGED
@@ -76,3 +76,4 @@ a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a
|
|
76
76
|
f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
|
77
77
|
e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814712 +0400 commit: fix
|
78
78
|
83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820652 +0400 commit: upd
|
79
|
+
120612cf1c0a44c1433355a4155c1aede0bbceef 911c11ff0ad81999f73c5dee56c8f6241d3ac346 alex <alex@amac.local> 1272821766 +0400 commit: fix
|
data/.git/logs/refs/heads/master
CHANGED
@@ -76,3 +76,4 @@ a5fe3c8ef2b84dbebb2181ceaebec710f5b163d4 0573ef490a937cd853c8d8d6affb63851451e0a
|
|
76
76
|
f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806420 +0400 commit: fix
|
77
77
|
e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814712 +0400 commit: fix
|
78
78
|
83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820652 +0400 commit: upd
|
79
|
+
120612cf1c0a44c1433355a4155c1aede0bbceef 911c11ff0ad81999f73c5dee56c8f6241d3ac346 alex <alex@amac.local> 1272821766 +0400 commit: fix
|
@@ -61,3 +61,4 @@ cda2dd4b5ecbc69fa1b1ebf09c580ba17bf69656 268fe011dd9d01aa6e05c2004280b78e149ea29
|
|
61
61
|
f3f41f5c38825fcae9dd63fc9f18ce66b9ce08b7 e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 alex <alex@amac.local> 1272806434 +0400 update by push
|
62
62
|
e68bedbf8dd4dacaa7f0a681fe083d4b754cb1f7 83e57169d9640366e3a95806fc2c73c98d686033 alex <alex@amac.local> 1272814722 +0400 update by push
|
63
63
|
83e57169d9640366e3a95806fc2c73c98d686033 120612cf1c0a44c1433355a4155c1aede0bbceef alex <alex@amac.local> 1272820661 +0400 update by push
|
64
|
+
120612cf1c0a44c1433355a4155c1aede0bbceef 911c11ff0ad81999f73c5dee56c8f6241d3ac346 alex <alex@amac.local> 1272821772 +0400 update by push
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/.git/refs/heads/master
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
911c11ff0ad81999f73c5dee56c8f6241d3ac346
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
911c11ff0ad81999f73c5dee56c8f6241d3ac346
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ require 'fileutils'
|
|
18
18
|
|
19
19
|
spec = Gem::Specification.new do |s|
|
20
20
|
s.name = "rails-ext"
|
21
|
-
s.version = "0.3.
|
21
|
+
s.version = "0.3.23"
|
22
22
|
s.summary = "Set of common Ruby on Rails extensions"
|
23
23
|
s.description = "Set of common Ruby on Rails extensions"
|
24
24
|
s.author = "Alexey Petrushin"
|
@@ -8,21 +8,22 @@ ActionController::Base.send :class_eval do
|
|
8
8
|
|
9
9
|
if options
|
10
10
|
options = options.stringify_keys if options
|
11
|
+
global_persistent_params = ActionController::Base.global_persistent_params
|
11
12
|
|
12
13
|
if Thread.current[:persist_params] or options.delete(:persist)
|
13
14
|
params.each do |key, value|
|
14
15
|
persist = (
|
15
16
|
(key =~ /^_/) and
|
16
17
|
!(options.include?(key) or DO_NOT_PERSIST.include?(key))
|
17
|
-
)
|
18
|
+
) or global_persistent_params.include?(key)
|
18
19
|
|
19
20
|
persistent_params[key] = value if persist
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
23
|
-
global_persistent_params.each do |key, value|
|
24
|
-
|
25
|
-
end
|
24
|
+
# global_persistent_params.each do |key, value|
|
25
|
+
# persistent_params[key] = value unless options.include?(key)
|
26
|
+
# end
|
26
27
|
end
|
27
28
|
|
28
29
|
return persistent_params
|
@@ -50,20 +51,20 @@ ActionController::Base.send :class_eval do
|
|
50
51
|
end
|
51
52
|
helper_method :do_not_persist_params
|
52
53
|
|
53
|
-
def prepare_global_persistent_params
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
end
|
63
|
-
def global_persistent_params
|
64
|
-
|
65
|
-
end
|
66
|
-
before_filter :prepare_global_persistent_params
|
54
|
+
# def prepare_global_persistent_params
|
55
|
+
# persistent_params = ActionController::Base.global_persistent_params
|
56
|
+
# prefix_params = ActionController::Base.global_path_prefix
|
57
|
+
# params = self.params.stringify_keys
|
58
|
+
# params.each do |key, value|
|
59
|
+
# if persistent_params.include?(key) and !prefix_params.include?(key)
|
60
|
+
# global_persistent_params[key] = value
|
61
|
+
# end
|
62
|
+
# end
|
63
|
+
# end
|
64
|
+
# def global_persistent_params
|
65
|
+
# @global_persistent_params ||= {}
|
66
|
+
# end
|
67
|
+
# before_filter :prepare_global_persistent_params
|
67
68
|
|
68
69
|
class << self
|
69
70
|
def global_persistent_params= params
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 23
|
9
|
+
version: 0.3.23
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Alexey Petrushin
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- .git/objects/0b/b62f25b6636b2ce32ebd4551120f5765b787e1
|
92
92
|
- .git/objects/0b/e101a0586410212b4ee5905881ad726b7b4907
|
93
93
|
- .git/objects/0c/4df6bee8ffbfd79927b23a070a4c9a41991152
|
94
|
+
- .git/objects/0c/d63588836394586cf3aec62339dba672e3fba1
|
94
95
|
- .git/objects/0d/aa3468e187093eff222b8094a6e702dea9ba4e
|
95
96
|
- .git/objects/0d/b63ec7380f5132ca02be93c82f5295e33c10a9
|
96
97
|
- .git/objects/0d/f02169bc94825e3629924eb44a662f07dc4dd8
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- .git/objects/13/a8efff96c74f758b770a3d6825e8ede1163130
|
110
111
|
- .git/objects/13/d5e53963c37e20ff517035b00f6b404c0e8056
|
111
112
|
- .git/objects/13/e384c8fc700987e1d3ad07936a93c55481bd9d
|
113
|
+
- .git/objects/13/e52335ce37dcd3ef032f5187b5971114a21cfb
|
112
114
|
- .git/objects/13/fd1506658a8432e3048715a654024162ee654f
|
113
115
|
- .git/objects/14/ff5ae72cfafe3787a600e2292edf2822c4e48e
|
114
116
|
- .git/objects/15/351f2f81548a7a0d9c4a6690894a42262fb7f5
|
@@ -160,6 +162,7 @@ files:
|
|
160
162
|
- .git/objects/26/8fe011dd9d01aa6e05c2004280b78e149ea29e
|
161
163
|
- .git/objects/27/37bd94ff477fad57bb86f0a3e37110f6a75cb5
|
162
164
|
- .git/objects/27/c51d8db9f25b7b6596dceb626252c90fd26b57
|
165
|
+
- .git/objects/27/f64dfbca8c6e228425b7e63b48eed190d29780
|
163
166
|
- .git/objects/27/f8a63386b8acf5edba3ed9334644455045acd8
|
164
167
|
- .git/objects/28/0d2d83eb4aa5fb48fefa1a8ceab6761cd9288d
|
165
168
|
- .git/objects/28/8e20f19c6662b1425e0a0797ae443f7eddcc4a
|
@@ -263,6 +266,7 @@ files:
|
|
263
266
|
- .git/objects/53/b8187421c09e55e44b8d6fb3c4cd7feb0a51b2
|
264
267
|
- .git/objects/54/713b018cb71a95e3f10510ea96b9f103ef0255
|
265
268
|
- .git/objects/55/0dd68cd7e6918dd1473d609e8cafcde8f89009
|
269
|
+
- .git/objects/55/3b8cd5bc6a69c81af2f957445c7a381fdf7220
|
266
270
|
- .git/objects/55/45d0d521bb723db8feae0223fa838a183e38b7
|
267
271
|
- .git/objects/55/4e8e5d25f1c00fb3743766532d9324e623b0a3
|
268
272
|
- .git/objects/55/6c13b26b6cecd286427a7f16c60c86c7df7885
|
@@ -349,6 +353,7 @@ files:
|
|
349
353
|
- .git/objects/78/dfe98fd2685e6fd0b937d866e5dfb1c83ae589
|
350
354
|
- .git/objects/79/0a80b72f6f6f214ece6a3e71e818effc5c9e6e
|
351
355
|
- .git/objects/79/4750e930e297c9616e902898f684967c2760c7
|
356
|
+
- .git/objects/79/b917ac5d56e3bffb0f63a9e3119ed32d638d42
|
352
357
|
- .git/objects/79/f570c126c66576fc1a5eaa52f003cf1b24e0d2
|
353
358
|
- .git/objects/7a/1d5b342eabedd35bb3c388eafcb6a42266e740
|
354
359
|
- .git/objects/7a/d62f1e2a8e4af39d293ce70c5dca999263ab4e
|
@@ -407,6 +412,7 @@ files:
|
|
407
412
|
- .git/objects/90/a3187c0cfd6ae0de236633da361820a4cf1b19
|
408
413
|
- .git/objects/90/ad7b150bde29d3a30f4a8ddd2463249e6c4418
|
409
414
|
- .git/objects/90/ca84ea326afab5fcc92a50469c2052ebc46f11
|
415
|
+
- .git/objects/91/1c11ff0ad81999f73c5dee56c8f6241d3ac346
|
410
416
|
- .git/objects/92/dc044f4d69a5cb3a6a3109c2ce6b7f90bac2ab
|
411
417
|
- .git/objects/92/debcedcd81c328806dc7506b3cd91990bb9775
|
412
418
|
- .git/objects/92/e1c250edfca72ed0932934257ef3cfc7122ec5
|
@@ -590,6 +596,7 @@ files:
|
|
590
596
|
- .git/objects/e0/d8e7ab5a565d95d44f2a9a6246be6003a3de7b
|
591
597
|
- .git/objects/e1/0c4f3ec5729fd4d2580d74e96a0489644a041a
|
592
598
|
- .git/objects/e1/323977dc6cda25967e6ec6166430c2c0f08e32
|
599
|
+
- .git/objects/e2/30f8b3acd20695be0a13fdd42aefa364ad1a4d
|
593
600
|
- .git/objects/e2/bc2615d3aa154bba2897c562a15ed19136d518
|
594
601
|
- .git/objects/e2/c37248908c561be703c405e237fbf0c743977a
|
595
602
|
- .git/objects/e2/df18fc21e446588205694aef1de7d63ca31b4f
|