by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Gustavo Caso
@GustavoCaso
You too
Piotr Solnica
@solnic
@jodosha good job :) enjoy the weekend
Aleksandr Gavrishchuk
@Aleksgav
Hello!
Can I get access to another value in custom validation rule?
Oskar Szrajer
@gotar
no
Oskar Szrajer
@gotar
but you can create a rule based on few attributes, or preprocess them to have access to necessary stuff inside "single field”, as far as I know
Aleksandr Gavrishchuk
@Aleksgav
@gotar Thanks
I use option with #with )
rehnathomas
@rehnathomas
Is it possible to pass arguments into Dry Validation Schema ?
Vasily Kolesnikov
@v-kolesnikov
rehnathomas
@rehnathomas
ok @v-kolesnikov Thank you.
Jeff Dickey
@jdickey
In dry-web-roda (and thus presumably in dry-view), how do I add per-page/view CSS assets?
Gustavo Caso
@GustavoCaso
@jdickey Well I'm hacking a project with dry-web-roda
and use some plugin from roda
let me check the code
Jeff Dickey
@jdickey
@GustavoCaso Cool; presumably you're farther along with your app than I am, then; thanks
Gustavo Caso
@GustavoCaso
Let see I have been in procrastination mode lately :joy:
Here the application file
Jeff Dickey
@jdickey
thanks; taking a look now
Gustavo Caso
@GustavoCaso
I use the roda plugin public and assets
Jeff Dickey
@jdickey
great; I'll chase down those. First time I've used Roda in a non-API app
Gustavo Caso
@GustavoCaso
This is my layout page
Hope this helps
Jeff Dickey
@jdickey
yep, that makes perfect sense; so obvious I couldn't possibly see it 🤓
thanks a lot; you just saved me likely a weekend of Rube Goldberging
Gustavo Caso
@GustavoCaso
hehe happy to help
Julien Blanchard
@julienXX
Hello is there a way with dry-transaction to have multiple arguments in a step without with_step_args? I'm calling a dry-transaction from a Rails controller and having the controller knowing the steps bothers me.
Gustavo Caso
@GustavoCaso
At the moment no
If you want you can overwrite the steps by wrapping them
Julien Blanchard
@julienXX
Thanks I'll have a look :)
Gustavo Caso
@GustavoCaso
No problem
Jamie Gaskins
@jgaskins
@jdickey Re: assets, I wrote a gem called roda-opal_assets that lets you use Sprockets with Roda for asset dependencies. Not sure if you need something that involved or if the assets plugin is enough, but it's just become my go-to for all assets in Roda apps now (not just Clearwater apps) since Sprockets handles caching and fingerprints for cache invalidation.
Ghost
@ghost~545771cbdb8155e6700d0a6f

quick question
if I have

MODEL  = Model::Country

and Model::Country is a dry-struct entity, which have couple of attributes from Dry-Types
and some how, wrongly, instead of using MODEL.new for instance in our code we repeated Model::Country that thrown attributes already initialized error, is this normal ?

Aaron Jensen
@aaronjensen
Anyone know what happened to dry-schema?
Tim Riley
@timriley
@aaronjensen development hasn’t started in earnest yet
it’s still coming
Aaron Jensen
@aaronjensen
oh. we were using it and the docs disappeared
Piotr Solnica
@solnic
@aaronjensen u sure you meant dry/schema? It hasn’t been released yet
Aaron Jensen
@aaronjensen
erg, i confused myself, sorry. We're using dry::validation and we have a module named schema :)
so, nevermind me. Just so I understand though, dry/schema will be some things extracted from dry-validation that would be able to be used on its own in some way?
unrelated question: If we wanted to validate that something was a hash with string keys and string or number values, would we have to write a custom validator or is there a way to represent that with existing validators or types?
Piotr Solnica
@solnic
validating keys is not supported
it’s one of the things that is on 1.0 roadmap
and yes, dry-schema will be a subset of dry-validation, and dry-validation 1.0 will be built on top of if
s/if/it/
Aaron Jensen
@aaronjensen
got it, thank you
Markus Unterwaditzer
@untitaker
If I have a field of type Array inside a dry struct, I can still modify the array in-place. Wouldn't it make sense to auto-freeze arrays and hashes during struct instantiation?
perhaps something like dup.freeze is actually necessary, since freeze itself is a form of mutation.