Closed eltoob closed 7 years ago
I am migrating from act_as_relation and I have the current architecture
merchant_account.rb
class MerchantAccount < ActiveRecord::Base actable end
test_merchant_account.rb
class TestMerchantAccount < ActiveRecord::Base acts_as :merchant_account, as: :as_merchant_account end
Then I can properly create a merchant account object, but can't call specific on the generic object
test = TestMerchantAccount.create(name: "test") test.merchant_account.specific => nil
As a FYI my merchant account model contains a as_merchant_account_id and as_merchant_account_type
Any idea on why specific is not working?
Try adding the as: : as_merchant_account to the actable call as well.
as: : as_merchant_account
actable
Please reopen if this problem still exists with the latest gem version.
I am migrating from act_as_relation and I have the current architecture
merchant_account.rb
test_merchant_account.rb
Then I can properly create a merchant account object, but can't call specific on the generic object
As a FYI my merchant account model contains a as_merchant_account_id and as_merchant_account_type
Any idea on why specific is not working?