rao-resources_controller 0.0.47.pre → 0.0.49.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/concerns/rao/resources_controller/awesome_nested_set_concern.rb +8 -2
- data/app/concerns/rao/resources_controller/batch_actions_concern.rb +2 -2
- data/app/concerns/rao/resources_controller/kaminari_concern.rb +7 -2
- data/app/views/rao/resources_controller/base/edit.html.haml +1 -1
- data/app/views/rao/resources_controller/base/new.html.haml +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49403d74f7f8f424205b8f94e50b24c5eeded006ddad1656d35b5bdb4a0edfc8
|
4
|
+
data.tar.gz: 860e42fee2505e0f0b62063a78003e90e6522af30aa59bae78396677ff6863d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67449b0e3579bb1b00fd22a4c53f8655c1f05f1fb91e20dff37bd2320f67decbfa549aa1ce8346d21b0445433ae52fea577a0ba8c10e093c5aa34ccb58dd464e
|
7
|
+
data.tar.gz: '059aace6a67a1d8f82e8db32055223c7f088f3d83f28e8bcd42328b1c3db0ee9220caf988da6aeea30fd067988d6a688cc69564de3a797be44d765782552c477'
|
@@ -4,7 +4,7 @@ module Rao
|
|
4
4
|
|
5
5
|
def reposition
|
6
6
|
@resource = load_resource
|
7
|
-
@dropped_resource =
|
7
|
+
@dropped_resource = load_resource_scope.find(params[:dropped_id])
|
8
8
|
@dropped_resource.move_to_right_of(@resource)
|
9
9
|
|
10
10
|
label_methods = [:human, :name, :email, :to_s]
|
@@ -25,7 +25,13 @@ module Rao
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
redirect_to
|
28
|
+
redirect_to after_reposition_location, notice: I18n.t("awesome_nested_set.flash.actions.reposition.notice", target_resource: target_resource_label, inserted_resource: inserted_resource_label)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def after_reposition_location
|
34
|
+
collection_path
|
29
35
|
end
|
30
36
|
end
|
31
37
|
end
|
@@ -12,10 +12,10 @@ module Rao
|
|
12
12
|
count = @collection.count
|
13
13
|
@collection.destroy_all
|
14
14
|
|
15
|
-
default_message = t('.success', inflections.merge(count: count))
|
15
|
+
default_message = t('.success', **inflections.merge(count: count, raise: false))
|
16
16
|
respond_with @collection,
|
17
17
|
location: after_destroy_many_location,
|
18
|
-
notice: t('rao.resources_controller.batch_actions_concern.destroy_many.success', inflections.merge(count: count, default: default_message))
|
18
|
+
notice: t('rao.resources_controller.batch_actions_concern.destroy_many.success', **inflections.merge(count: count, default: default_message))
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
@@ -4,13 +4,18 @@ module Rao
|
|
4
4
|
|
5
5
|
included do
|
6
6
|
helper_method :paginate?
|
7
|
+
helper_method :per_page
|
7
8
|
end
|
9
|
+
|
10
|
+
private
|
8
11
|
|
9
12
|
def paginate?
|
10
13
|
true
|
11
14
|
end
|
12
15
|
|
13
|
-
|
16
|
+
def per_page_default
|
17
|
+
Rao::ResourcesController::Configuration.pagination_per_page_default
|
18
|
+
end
|
14
19
|
|
15
20
|
def load_collection
|
16
21
|
@collection = load_collection_scope.page(params[:page]).per(per_page)
|
@@ -19,7 +24,7 @@ module Rao
|
|
19
24
|
def per_page
|
20
25
|
# Return page size from configuration if per_page is not present in params
|
21
26
|
unless params.has_key?(:per_page)
|
22
|
-
return
|
27
|
+
return per_page_default
|
23
28
|
end
|
24
29
|
|
25
30
|
# Return count of all records or nil if no records present if
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-resources_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.49.pre
|
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:
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rao
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: '1.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: '1.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rails-dummy
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,14 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
203
|
requirements:
|
204
204
|
- - ">="
|
205
205
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
206
|
+
version: 2.6.0
|
207
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
209
|
- - ">"
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: 1.3.1
|
212
212
|
requirements: []
|
213
|
-
rubygems_version: 3.
|
213
|
+
rubygems_version: 3.4.11
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: Resources Controllers for Ruby on Rails.
|