Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Oskar Szrajer
@gotar
and I got
  KeyError:
    key not found: :csrf_metatag
  # ./lib/athit/page.rb:54:in `fetch'
  # ./lib/athit/page.rb:54:in `[]'
  # ./lib/athit/page.rb:30:in `csrf_metatag'
Tim Riley
@timriley
@gotar you'll need to pass a context at call-time with the request-specific stuff loaded into it
view.(context: some_context)
@gotar check out the PR I just made to dry-web-roda, so you can see it there
I'm sleeping now, happy to answer q's in the morning
Oskar Szrajer
@gotar
eheh thx ;]
Tim Riley
@timriley
I'll try update Berg next week but I may not be able to fit it in
Oskar Szrajer
@gotar
not a problem i Just play to learn
Piotr Solnica
@solnic
psst, we have a new gem => https://github.com/dry-rb/dry-monitor
just pushed 0.0.1 to rubygems /cc @AMHOL
Luca Guidi
@jodosha
:+1:
Maciej Mensfeld
@mensfeld
Tim Riley
@timriley
@mensfeld things don't go to the website right away :)
Andy Holland
@AMHOL
@solnic awesome :)
Piotr Solnica
@solnic
I’ll build a website with docs once it’s out of alpha
which should be soon, because it’s so simple
the biggest challenge is to make this 1st class concept in rom
for now I monkeypatched SQL::Relation :monkey_face:
Tim Riley
@timriley
"OH solnic now I monkeypatched..."
Piotr Solnica
@solnic
heh btw THIS is how monkeypatching is useful
otherwise we’d be blocked
and in such cases I love Ruby SO MUCH
Tim Riley
@timriley
Yeah I was just gonna say that too, haha :)
Piotr Solnica
@solnic
btw instrumentation integration between Sequel/rom-sql and AS::Notifications for rom-rails == a monkey-patch
which I actually copied from sequel-rails railite
but it won’t be like that for long
because I’ll be adding proper support for instrumentation to rom and rom-sql (as I mentioned already)
Oskar Szrajer
@gotar
Wot so fast ;] I need update again :)
@timriley I update dry view in the project and everything work ok (but will probably change few things after I see how you guys resolve it in berg, I'm not fully happy how I extend view_context by assets and current user . Plus I spend some time investigating why my partial do not work (single one) and found that it have the same name as one method in context. So it render method not partial, It's something a lot probably hit one day, so maybe another idea here will be better to explicity know when I want to render partial and when method
Oskar Szrajer
@gotar
@solnic I think your last update for dry-web-(roda) can cause problems - (need changes in dry-web-roda). It requires log directory to exists for any app in apps folder, store logs there not in main log directory, plus app generator for dry-web-roda already add to boot logger and register it as logger in Container so it crash . Maybe it's only my app but worth to check
Tim Riley
@timriley
Thanks for for trying these out, @gotar. I'll check dry-web-roda today
Oskar Szrajer
@gotar
chages required (I assume are required) for dry-monitor are super easy, both for app generator to drop custom logger and add two directories
Piotr Solnica
@solnic
@gotar yeah I didn’t have time to update generators
I’ll add docs over the weekend while flying to AU :laughing:
btw we follow “shifted semver” so if you see a minor bump while we’re still in beta (and all dry gems are in beta) then it means a breaking change
and re logger, just configure config.logger = YourMainContainer[:logger] in sub-apps
unless you want separate loggers per app
Darcy Laycock
@Sutto
@solnic when do you get in?
Piotr Solnica
@solnic
@Sutto Sunday morning
we’re going to London first, spending the night, then jumping on a plane on Saturday again
Darcy Laycock
@Sutto
awesome - all sorted for when you get here?
Piotr Solnica
@solnic
I hope so :laughing:
Darcy Laycock
@Sutto
The Rubyconf AU organisers are usually pretty fantastic at having all basses covered haha
Piotr Solnica
@solnic
oh yes they are amazing
Tim Riley
@timriley
@solnic FYI: I’m working on updating the dry-web-roda generators
Pat Collins
@patcoll
If I want to validate a list of email addresses at a particular key, what would be the syntax to do that?
Jonah
@jonahx
I’m trying to create a custom form validation. I got the validation part working but not sure how to customize the coercion part automatically. Here’s what I have so far:
schema = Dry::Validation.Form do
  configure do
    def future_date?(value)
      Date.new < Date.parse(value)
    end
  end
  required(:date).filled(:future_date?)
end
Piotr Solnica
@solnic
@jonahx filled(:date?, :future_date?)