Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Владимир
@3LKCFGdv6eHyQ0U_twitter
Screenshot from 2019-11-19 14-04-16.png
Screenshot from 2019-11-19 14-03-48.png
Screenshot from 2019-11-19 14-05-27.png
Nick Sutterer
@apotonick
Hi @3LKCFGdv6eHyQ0U_twitter - I didn't even know this gem exists (AA-reform), how old is it?
Nick Sutterer
@apotonick
@nalbeza It sounds like populators could do the job?
nalbeza
@nalbeza
@apotonick I'll look into that, thanks !
Nick Sutterer
@apotonick
@nalbeza It's difficult for Reform to cover all aspects of parsing (which is what you want, I guess?)
But we'll get there, eventually :P
Viktor
@skcc321
Hi there, If anyone needs errors presentation as a hash (reform errors) here is a gem which patches the latest reform gem.
Nick Sutterer
@apotonick
@skcc321 Cool! I will review it in the coming days!
:metal:
Viktor
@skcc321
would be amaizing @apotonick
Kelly Felkins
@kellyfelkins
Hello. My first time here. I've had cells in a project from before cells was adopted by Nick and Trailblazer (thank you!). I'm now trying to bring it into the modern era, and my rails project from 4.2 to 5. It feels like what I thought was cells has changed. My cells implement an index method, and they are referenced from a layout. The result is that controllers are not cluttered with looking up objects that are unrelated to the task of that controller, but are related to render the navigation links on the page. Is that still appropriate in a cell?
Nick Sutterer
@apotonick
@kellyfelkins Hi Kelly! Quick question: you were using which Cells version?
BTW we simply moved Cells from my repo to Trailblazer, it's been "in our hands" ever since
Kelly Felkins
@kellyfelkins
Hey @apotonick , I'm migrating from cells 3.11.3 to 4.1.7. I was previously testing my cells by checking assigns. I've added the migration helper (ApplicationCell). With that things are falling into place. Maybe the biggest stumbling block was a cell that used a partial. I found a stack overflow response by konung that helped. I'm now testing the generated html with capybara matchers.
Marvin Trejo
@marvin.trejo_gitlab
@apotonick I have a question for you, how can I use dry-validation 1.3 with reform? because i have been getting this error undefined method required for class
gem 'trailblazer', '2.1.0' gem 'trailblazer-rails', '2.1.7' gem 'trailblazer-operation', '0.6.0' gem 'reform', '2.3.0.rc2' gem 'reform-rails', '0.2.0.rc3' gem 'dry-validation', '1.3.1' gem 'dry-monads', '1.3.1'
those are the gems that I'm using
Nick Sutterer
@apotonick
@kellyfelkins Yeah, that's how I test my cells as well, with Capybara
Is that a problem, @kellyfelkins ?
@marvin.trejo_gitlab open an issue on Reform, I'm not in charge of Reform 2.3 anymore, @emaglio is ;)
Marvin Trejo
@marvin.trejo_gitlab
@emaglio Can you help me with that issue? trailblazer/reform#504
Nick Sutterer
@apotonick
@marvin.trejo_gitlab He's probably still asleep
:laughing:
Kelly Felkins
@kellyfelkins
@apotonick Not a problem. I'm good. Thanks for all you do.
Alex
@legendado
@apotonick Hi, Nick! Can I build RESTful API with Rails and Trailblazer?
Nick Sutterer
@apotonick
@legendado Hi Alex! Of course, check the last chapters of the book. They're a bit outdated, but the concepts still apply
Nick Sutterer
@apotonick
@kellyfelkins We're about to launch the new website and 2.1 very soon and I promise to do some work on Cells then
:smile:
kernel-io
@kernel-io
@apotonick :wave:
Nick Sutterer
@apotonick
Hey @kernel-io you're back?!?!?!
Alex
@legendado
@apotonick Hi Nick! I tried to use flow-control methods with trb operation. The documentation says there are success and failure methods, but when I call them I've got undefined method errors
Nick Sutterer
@apotonick
@legendado success and failure methods?
Alex
@legendado
yep
Nick Sutterer
@apotonick
Alex
@legendado
oh, thanks a lot
Nick Sutterer
@apotonick
Pleasure! We will launch the new website in a few dazs
Jack
@jackiig
Looking forward to those new tutorials. Especially Nesting. That's one place I've had a hard time so far.
Nick Sutterer
@apotonick
@jackiig Cool, that's what I'm writing about right now - any specific things you want to learn?
The more input, the better!
Bashir Duranai-Khan
@bduranai-khan_gitlab

@apotonick regarding nesting: I have a model (Person) with a nested model (Profile) inside using embeds_one. I have an API built for Person (person) and an api built for Profile (person/:person_id/profile). I have a contract for both person and profile with validations on each. When I do a new post request with a Person and include a profile in it the validations for person run but the validations for profile don't. So even though profile has a bunch of fields in it that are required in the contract, it successfully builds the object even though profile and its required fields don't exist in the post request.

So basically I'm having an issue with nested validation on contracts. Any help would be appreciated. Also you can include that in the docs 👍

Exegete
@exegete46
@apotonick (forgive the account switch from @jackiig) - The most recent challenge that comes to mind is having a CollectPayment Operation (charging a credit card), which is nested inside a CompletePurchase Operation. My current implementation with payment_result.success? feels clunky, and I'm sure there's a better way to proceed.
Nick Sutterer
@apotonick
@bduranai-khan_gitlab Thanks for the feedback! It's a Reform/parsing issue in your case and not related to Trailblazer's activities. I know that Reform offers parsing and that offers many ways to "do it wrong" (and Reform's API sucks) but it's something we will tackle in the coming year with transform
@exegete46 Excellent! There are much better means now with trailblazer-workflow but I'll try to answer your question in the coming Nesting tutorial
Great feedback, both of you! :beers:
Exegete
@exegete46
@apotonick Dumb question... Are the tutorials on Github? I see trailblazer/tutorial, but that looks more like example code, not the tutorials itself?
Nick Sutterer
@apotonick