Skip to content

Commit

Permalink
feat: return special address when the address is special
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Dec 14, 2019
1 parent 4a8d7ed commit 29afdfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/serializers/address_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ class AddressSerializer
attribute :is_special do |object|
object.special?.to_s
end

attribute :special_address, if: Proc.new { |record| record.special? } do |object|
Settings.special_addresses[object.address_hash]
end
end

0 comments on commit 29afdfb

Please sign in to comment.