AaronLasseigne / active_interaction

:briefcase: Manage application specific business logic.
MIT License
2.06k stars 136 forks source link

array :emails is always nil. Why? #547

Closed Asdfif closed 1 year ago

Asdfif commented 1 year ago
    array :emails, default: [] do
      string
    end

variable 'emails' is always nil. why?

if i rename array to 'emails_list' for example, it works correctly.

AaronLasseigne commented 1 year ago

It works:

class I < ActiveInteraction::Base
  array :emails, default: [] do
    string
  end

  def execute
    emails
  end
end

> I.run!(emails: ['one at number.com', 'two at number.com']))
# => ["one at number.com", "two at number.com"]
Asdfif commented 1 year ago

hmm. looks like I have some local problem, thank You