Changing attributes in action
I am trying to simplify the commented out code by using
expr()
, but i get an InvalidAttributeError
with the hint string_downcase(nil)
Also I am not sure if to put it in before_action
or not since from what I saw the change does not appear in the Phoenix form. So in both cases it should only appear in the database ?2 Replies
you don't have any arguments in the action just like the error states
maybe replace
^arg(:name)
with name
Unfortunatly not
even when it is passed as an argument it fails with
value: string_downcase("Test")
:/