我写了这个规则:
current_user.positions.buy.open.group("ticker")
=> #<Position::ActiveRecord_AssociationRelation:0x3ffdf189d6d4>
current_user.positions.buy.open.order(transaction_date: :desc).group("ticker.name")
Position Load (2.9ms) SELECT "positions".* FROM "positions" INNER JOIN "portfolios" ON "positions"."portfolio_id" = "portfolios"."id" WHERE "portfolios"."user_id" = $1 AND "positions"."action" = $2 AND "positions"."status" = $3 GROUP BY ticker.name ORDER BY "positions"."transaction_date" DESC [["user_id", 2], ["action", 0], ["status", 0]]
Position Load (2.3ms) SELECT "positions".* FROM "positions" INNER JOIN "portfolios" ON "positions"."portfolio_id" = "portfolios"."id" WHERE "portfolios"."user_id" = $1 AND "positions"."action" = $2 AND "positions"."status" = $3 GROUP BY ticker.name ORDER BY "positions"."transaction_date" DESC LIMIT $4 [["user_id", 2], ["action", 0], ["status", 0], ["LIMIT", 11]]
=> #<Position::ActiveRecord_AssociationRelation:0x3ffdefe0a7a4>
但伊莎贝尔告诉我
method rule_inversion uses P =
(cases rule: nt_network[OF P])
确切的Rule has fewer premises than arguments given
似乎无关紧要,因为这以相同的方式失败:
nt_network
当method rule_inversion uses R P =
(cases rule: R[OF P])
是该策略的参数时,如何将OF P
应用于在Eisbach中用于cases
的规则?