itsf_backend 3.0.7 → 3.1.0
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dba7df55da3a16d726325289495274aaaa991f6
|
4
|
+
data.tar.gz: cd5b43538b9080d8b761df1a3959ccb8437501b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24be68819b940e891f24b8b13fc629c4bf87aeea222121216274a03d5744bc5d74c78ce8f752756c40315abaefcecaf25e0aae28ebfad2b46b6670a95cd814a
|
7
|
+
data.tar.gz: 85f12a5f32d79b7528629f6185a50e95d72f2cb2b9be2dca096f2105dea607604f0f85b5a2f825da8fbe50a426fae735cbc275aa64b3d722478d8721576b299c
|
@@ -62,7 +62,7 @@ module Controller
|
|
62
62
|
private
|
63
63
|
|
64
64
|
def after_create_location
|
65
|
-
|
65
|
+
@resource
|
66
66
|
end
|
67
67
|
|
68
68
|
def after_destroy_location
|
@@ -70,7 +70,7 @@ module Controller
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def after_update_location
|
73
|
-
|
73
|
+
@resource
|
74
74
|
end
|
75
75
|
|
76
76
|
def authorize_action
|
@@ -91,21 +91,49 @@ module Controller
|
|
91
91
|
final_scope
|
92
92
|
end
|
93
93
|
|
94
|
-
def
|
94
|
+
def search_scopes
|
95
|
+
return [] unless params.key?(:q) && params[:q].key?(:scopes)
|
96
|
+
params[:q][:scopes].keys - ['unscoped']
|
97
|
+
end
|
98
|
+
|
99
|
+
def base_scope
|
95
100
|
resource_class
|
96
101
|
end
|
97
102
|
|
103
|
+
def after_create_location
|
104
|
+
collection_path
|
105
|
+
end
|
106
|
+
|
107
|
+
def after_destroy_location
|
108
|
+
collection_path
|
109
|
+
end
|
110
|
+
|
111
|
+
def after_update_location
|
112
|
+
collection_path
|
113
|
+
end
|
114
|
+
|
115
|
+
def collection_scope
|
116
|
+
base_scope
|
117
|
+
end
|
118
|
+
|
119
|
+
def initialize_scope
|
120
|
+
base_scope
|
121
|
+
end
|
122
|
+
|
98
123
|
def initialize_resource
|
99
|
-
|
124
|
+
initialize_scope.new
|
100
125
|
end
|
101
126
|
|
102
|
-
def
|
103
|
-
|
127
|
+
def load_collection
|
128
|
+
collection_scope.all
|
104
129
|
end
|
105
130
|
|
106
|
-
def
|
107
|
-
|
108
|
-
|
131
|
+
def load_scope
|
132
|
+
base_scope
|
133
|
+
end
|
134
|
+
|
135
|
+
def load_resource
|
136
|
+
load_scope.find(params[:id])
|
109
137
|
end
|
110
138
|
end
|
111
139
|
end
|
@@ -47,13 +47,13 @@ module Itsf::Backend
|
|
47
47
|
def after_create_location
|
48
48
|
return edit_resource_path(@resource) if params.has_key?(:commit_and_continue_with_edit)
|
49
49
|
return new_resource_path if params.has_key?(:commit_and_continue_with_new)
|
50
|
-
|
50
|
+
@resource
|
51
51
|
end
|
52
52
|
|
53
53
|
def after_update_location
|
54
54
|
return edit_resource_path(@resource) if params.has_key?(:commit_and_continue_with_edit)
|
55
55
|
return new_resource_path if params.has_key?(:commit_and_continue_with_new)
|
56
|
-
|
56
|
+
@resource
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
data/lib/itsf/backend/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itsf_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -506,6 +506,7 @@ files:
|
|
506
506
|
- app/controllers/concerns/controller/awesome_nested_set_concern.rb
|
507
507
|
- app/controllers/concerns/controller/collection_links_concern.rb
|
508
508
|
- app/controllers/concerns/controller/feature_flags_concern.rb
|
509
|
+
- app/controllers/concerns/controller/friendly_id_concern.rb
|
509
510
|
- app/controllers/concerns/controller/pagination_concern.rb
|
510
511
|
- app/controllers/concerns/controller/pundit_authorization_failure_handling_concern.rb
|
511
512
|
- app/controllers/concerns/controller/pundit_namespaced_authorize_concern.rb
|