TLDR:
amount
amount(1i)
class Transaction < ApplicationRecord # … def amount=(value) if value.is_a? Hash # do stuff with value[1] etc end super(value) end # … end