simple_action 2.0.4 → 2.0.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/README.md +8 -0
- data/lib/simple_action/concerns/transactable.rb +6 -2
- data/lib/simple_action/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 251fe5dd84800b8479a11280c5f70e9c9307e307c8ca7e0039f44c62d7a7c0da
|
4
|
+
data.tar.gz: 805924d30301d49f594d9c991512142c98a8c4a54612d155641745384d9f0551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 103e62593fd15e4a0418854928ae581e51df5842e112c8959854a1f9d11c5c70d45e1573b2574f19d917d7da677000c2bf7697776bdaf3a2e06a35b03ffe47c1
|
7
|
+
data.tar.gz: f1d78302fe40ed31f856daf3daf392266f6237825698cf525f678bed965e115c79789c489c0c42b84586187d3c5bada337b036d4aa282b4bbac92063fa92da21
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -107,6 +107,14 @@ params.dog.name #=> "Bailey"
|
|
107
107
|
params.dog.breed #=> "Shiba Inu"
|
108
108
|
```
|
109
109
|
|
110
|
+
# Using Transactions
|
111
|
+
|
112
|
+
By default, SimpleAction via SimpleParams will run the `execute` method inside of an ActiveRecord transaction. You can modify this setting inside an initializer file.
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
SimpleAction::Service.transaction = false
|
116
|
+
```
|
117
|
+
|
110
118
|
# ApiPie Documentation
|
111
119
|
|
112
120
|
If your project is using [apipie-rails](http://example.com/ "apipie-rails"),
|
@@ -32,9 +32,13 @@ module SimpleAction
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
def transaction=(bool)
|
36
|
+
@transaction = !!bool
|
37
|
+
end
|
38
|
+
|
35
39
|
# @return [Boolean]
|
36
40
|
def transaction?
|
37
|
-
true
|
41
|
+
defined?(@transaction) ? @transaction : true
|
38
42
|
end
|
39
43
|
|
40
44
|
# @return [Hash]
|
@@ -42,4 +46,4 @@ module SimpleAction
|
|
42
46
|
{}
|
43
47
|
end
|
44
48
|
end
|
45
|
-
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_action
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brycesenz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_params
|
@@ -140,7 +140,7 @@ homepage: https://github.com/brycesenz/simple_action
|
|
140
140
|
licenses:
|
141
141
|
- MIT
|
142
142
|
metadata: {}
|
143
|
-
post_install_message:
|
143
|
+
post_install_message:
|
144
144
|
rdoc_options: []
|
145
145
|
require_paths:
|
146
146
|
- lib
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubygems_version: 3.0.0
|
159
|
-
signing_key:
|
159
|
+
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: A DSL for specifying services objects, including parameters and execution
|
162
162
|
test_files:
|