Skip to content

Commit a10814d

Browse files
committed
Added a few returns back in to clarify some code
1 parent becef42 commit a10814d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/jsonapi/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def parse_params(params, allowed_fields)
455455
end
456456
end
457457

458-
{
458+
return {
459459
'attributes' => checked_attributes,
460460
'has_one' => checked_has_one_associations,
461461
'has_many' => checked_has_many_associations

lib/jsonapi/resource.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def change(callback)
5252
end
5353
end
5454

55-
completed ? :completed : :accepted
55+
return completed ? :completed : :accepted
5656
end
5757

5858
def remove
@@ -515,7 +515,7 @@ def verify_key(key, _context = nil)
515515

516516
# override to allow for key processing and checking
517517
def verify_keys(keys, context = nil)
518-
keys.collect do |key|
518+
return keys.collect do |key|
519519
verify_key(key, context)
520520
end
521521
end
@@ -571,7 +571,7 @@ def _resource_name_from_type(type)
571571
class_name = "#{type.to_s.underscore.singularize}_resource".camelize
572572
@@resource_types[type] = class_name
573573
end
574-
class_name
574+
return class_name
575575
end
576576

577577
def _paginator

0 commit comments

Comments
 (0)