active_scaffold_config_list 3.2.2.1 → 3.2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README
CHANGED
@@ -17,8 +17,9 @@ conf.config_list.save_to_user = :config_list_for
|
|
17
17
|
|
18
18
|
class User < ActiveRecord::Base
|
19
19
|
has_many :list_configurations
|
20
|
-
def config_list_for(controller_id)
|
21
|
-
list_configurations.where(:controller_id => controller_id).first_or_initialize
|
20
|
+
def config_list_for(controller_id, controller_name)
|
21
|
+
list_configurations.where(:controller_id => controller_id).first_or_initialize # different columns on different nested or embedded conditions
|
22
|
+
list_configurations.where(:controller_id => controller_name).first_or_initialize # one configuration for the controller, even embedded or nested
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
@@ -33,7 +33,7 @@ module ActiveScaffold::Actions
|
|
33
33
|
|
34
34
|
def delete_config_list_params
|
35
35
|
if active_scaffold_config.config_list.save_to_user && current_user = send(ActiveRecordPermissions.current_user_method)
|
36
|
-
current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key).destroy
|
36
|
+
current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key, controller_name).destroy
|
37
37
|
else
|
38
38
|
active_scaffold_session_storage[:config_list] = nil
|
39
39
|
end
|
@@ -42,7 +42,7 @@ module ActiveScaffold::Actions
|
|
42
42
|
|
43
43
|
def save_config_list_params(config_list)
|
44
44
|
if active_scaffold_config.config_list.save_to_user && current_user = send(ActiveRecordPermissions.current_user_method)
|
45
|
-
current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key).update_attribute :config_list, config_list.join(',')
|
45
|
+
current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key, controller_name).update_attribute :config_list, config_list.join(',')
|
46
46
|
else
|
47
47
|
active_scaffold_session_storage[:config_list] = config_list.map(&:to_sym)
|
48
48
|
end
|
@@ -51,7 +51,7 @@ module ActiveScaffold::Actions
|
|
51
51
|
|
52
52
|
def config_list_params
|
53
53
|
@config_list_params = if active_scaffold_config.config_list.save_to_user && current_user = send(ActiveRecordPermissions.current_user_method)
|
54
|
-
params = current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key).config_list
|
54
|
+
params = current_user.send(active_scaffold_config.config_list.save_to_user, active_scaffold_session_storage_key, controller_name).config_list
|
55
55
|
params.split(',').map(&:to_sym) if params
|
56
56
|
else
|
57
57
|
active_scaffold_session_storage[:config_list]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_config_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 99
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
9
|
- 2
|
10
|
-
-
|
11
|
-
version: 3.2.2.
|
10
|
+
- 2
|
11
|
+
version: 3.2.2.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Sergio Cambra
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 2736369779
|
29
29
|
segments:
|
30
30
|
- 3
|
31
31
|
- 3
|