Rebecca Le
AEAsh Elixir
•Created by Rebecca Le on 7/7/2023 in #support
Broadcasting pubsub update notifications only if the resource has been changed?
12 replies
AEAsh Elixir
•Created by Rebecca Le on 7/7/2023 in #support
Broadcasting pubsub update notifications only if the resource has been changed?
I think configuring it in the notifier would be better
12 replies
AEAsh Elixir
•Created by Rebecca Le on 7/7/2023 in #support
Broadcasting pubsub update notifications only if the resource has been changed?
ah right, if you had an update action that doesn't touch the resource itself, but uses hooks to do related stuff, you still want to know about it. that makes sense
12 replies
AEAsh Elixir
•Created by Rebecca Le on 7/7/2023 in #support
Broadcasting pubsub update notifications only if the resource has been changed?
it seems like a sensible default to me, but it would definitely be a breaking change if anyone was relying on the old behaviour. i can't think of an example of when the current behaviour would be wanted though.
for atomic operations (or any case where it can't be known if something happened or not) we should probably default to sending the notification
12 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
I got this to work 😄
My resource code:
My test factory code:
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
I can add one in my project and then contribute it back 👍
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
okay so I'm definitely using it very wrong
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
the docs say
Validations that should pass in order for this validation to apply. These validations failing will not invalidate the changes, but will instead result in this validation being ignored. Accepts a module, module and opts, or a 1 argument function that takes the changeset. Defaults to [] .so its not "return a boolean to run", but I don't know what it is
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
I think I'm not understanding how to run the validation conditionally. I've tried:
but that seems to always skip it
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
I'll take a look at doing this shortly and mark resolved if I can get it all working 🙂
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
that would be doable, given I only do it a few places in factory methods I think
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
Yeah I thought later maybe I could add an argument to the action to decide whether or not to run the external validation, defaulting to true, set to false in tests
25 replies
AEAsh Elixir
•Created by Rebecca Le on 6/12/2023 in #support
Possible to skip validation for an action? (or best practices for working with external credentials)
I have just seen that its possible to
skip_global_validations?
from inside an action (I'm guessing that would be validations from a validations
block on the resource?) so there might be a way to skip validations from outside, hidden somewhere25 replies
AEAsh Elixir
•Created by Stefan Wintermeyer on 2/9/2023 in #support
Which type for Text?
I'm pretty sure using
:string
will define fields as type text, so not size limited like a varchar3 replies
AEAsh Elixir
•Created by Stefan Wintermeyer on 1/23/2023 in #support
Create a resource including a belongs_to id
In your Location resource:
this would allow the
level_id
attribute to be set when creating a Location, ensuring it's also a valid value etc.12 replies
AEAsh Elixir
•Created by Stefan Wintermeyer on 1/23/2023 in #support
Create a resource including a belongs_to id
in your
create
action definition, you would use manage_relationship
to allow the setting of the level_id
- let me grab an example12 replies