Skip to content

Commit 8f95930

Browse files
committed
Refactor transactional method name for clarity.
1 parent e9df999 commit 8f95930

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/jsonapi/operation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def initialize(operation_type, resource_klass, options)
88
@options = options
99
end
1010

11-
def transactional
12-
JSONAPI::Processor._processor_from_resource_type(resource_klass).transactional(operation_type)
11+
def transactional?
12+
JSONAPI::Processor._processor_from_resource_type(resource_klass).transactional_operation_type?(operation_type)
1313
end
1414

1515
def process

lib/jsonapi/operation_dispatcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def process(operations)
1717
# Even if transactional transactions won't be used unless the derived OperationsProcessor supports them.
1818
transactional = false
1919
operations.each do |operation|
20-
transactional |= operation.transactional
20+
transactional |= operation.transactional?
2121
end
2222

2323
transaction(transactional) do

lib/jsonapi/processor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _processor_from_resource_type(resource_klass)
3131
processor
3232
end
3333

34-
def transactional(operation_type)
34+
def transactional_operation_type?(operation_type)
3535
case operation_type
3636
when :find, :show, :show_related_resource, :show_related_resources
3737
false

0 commit comments

Comments
 (0)