@Martin Bailey

if I found myself with 50 messages in the model update I'd take as a sign 
that I need to abstract things more.

Regarding the update of nested attributes, I agree that there is not a good 
way to do it, hence this thread. =)



@Michael Jones

Maybe something like this could work for you:

    case lol of
        Submit locationList ->
            let
                results =
                    validateEditLocationListForm model.locationListData

                ( newLocationListData, cmd ) =
                    if List.length results > 0 then
                        ( { locationListData | errors = Just results }, 
Cmd.none 
)
                    else
                        ( { model | locationListData = data }, 
postUpdateLocationList locationListData locationList )
            in
                ( { model | locationListData = newLocationListData }, cmd )




-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to