Railsの開発は初めてです。メソッドのエイリアスをいくつか作成しましたが、どのエイリアスが呼び出されているかを知りたいです。
私はこのコードを持っています。
alias_method :net_stock_quantity_equals :net_stock_quantity
alias_method :net_stock_quantity_gte :net_stock_quantity
alias_method :net_stock_quantity_lte :net_stock_quantity
alias_method :net_stock_quantity_gt :net_stock_quantity
alias_method :net_stock_quantity_lt :net_stock_quantity
def net_stock_quantity
#some code here
end
ユーザーがどのエイリアスを呼び出したか知りたいです。ユーザーが電話をかけた場合のように、ユーザーが電話をかけなかっnet_stock_quantity_equals
たことを知っておく必要があります。net_stock_quantity_equals
net_stock_quantity
どんな助けでもいただければ幸いです。