maquina 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/concerns/maquina/create.rb +0 -1
- data/app/controllers/concerns/maquina/edit.rb +1 -1
- data/app/controllers/concerns/maquina/resourceful.rb +2 -2
- data/app/controllers/concerns/maquina/update.rb +1 -2
- data/lib/maquina/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31ab94ae292dc94ebccc7ad33cd520b29a8bd945620f4d698239a6fec7a686a3
|
4
|
+
data.tar.gz: ee06ac7e22a088a2386cf3ca2d6f83aa3d4cff47102c22efaa495b464ac2cf97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53eb9e8dee812c60f8c33c770dc8c0a6ad4543f55d29be3c3aa2613f166578392bab79b446e119e135f6a90f846d85ef84d39b23a820ae6cd80e3bcdf00939e7
|
7
|
+
data.tar.gz: c62d7bec012895f8feca619c6c753e97e4cf27d4fcb3e1f58e79f1d14d403efd55ec4257fdda5d7f70cadc80b8c6acfef84f136fa3b93d902b1f56a5f6e2cb0e
|
data/Gemfile.lock
CHANGED
@@ -16,7 +16,6 @@ module Maquina
|
|
16
16
|
end
|
17
17
|
|
18
18
|
@status = @resource.errors.empty? ? :created : :unprocessable_entity
|
19
|
-
Rails.logger.debug "CREATE validation: #{@resource.errors.inspect}" if status == :unprocessable_entity
|
20
19
|
response.status = @status
|
21
20
|
set_flash_message(@status)
|
22
21
|
|
@@ -65,9 +65,9 @@ module Maquina
|
|
65
65
|
method_name = :secure_params
|
66
66
|
method_action_name = "#{action_name}_#{method_name}".to_sym
|
67
67
|
|
68
|
-
if respond_to?(method_action_name)
|
68
|
+
if respond_to?(method_action_name, true)
|
69
69
|
send(method_action_name)
|
70
|
-
elsif respond_to?(method_name)
|
70
|
+
elsif respond_to?(method_name, true)
|
71
71
|
send(method_name)
|
72
72
|
else
|
73
73
|
params.require(resource_class.model_name.element.to_sym).permit(form_attributes.flat_map { |field| field.keys })
|
@@ -7,7 +7,7 @@ module Maquina
|
|
7
7
|
included do
|
8
8
|
def update(&block)
|
9
9
|
@resource ||= begin
|
10
|
-
scope = resource_class
|
10
|
+
scope = resource_class.all
|
11
11
|
scope = authorized_scope(scope) if policy_class.present?
|
12
12
|
|
13
13
|
resource = scope.find_by!(find_by_param => params[:id])
|
@@ -20,7 +20,6 @@ module Maquina
|
|
20
20
|
saved = @resource.update(resource_secure_params)
|
21
21
|
|
22
22
|
status = saved ? :accepted : :unprocessable_entity
|
23
|
-
Rails.logger.debug "UPDATE validation: #{@resource.errors.inspect}" if status == :unprocessable_entity
|
24
23
|
response.status = status
|
25
24
|
set_flash_message(status)
|
26
25
|
|
data/lib/maquina/version.rb
CHANGED