I have an enum called access defined on an account model.
enum access: [:basic, :silver, :gold, :platinum]
which works fine, e.g. account.gold!
sets the value to 'gold' and then account.access
returns 'gold'. Accordingly, I should be able to list the hash of access values with the plural of acesss
, but account.accesses
, returns
NoMethodError: undefined method `accesses' for #<Account:0x00007f9e7827e408>
Did you mean? access
access?
access=
If I do 'access'.pluralize
it returns accesses
, so why isnt account.accesses
working?