Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Piotr Solnica
@solnic
berg is a multi-app setup so it’s much more complex than a single-app
Oskar Szrajer
@gotar
yeah, but most apps needs multi apps setup, like admin panel, api, ...
Piotr Solnica
@solnic
I agree!
but it’s not the best learning experience when somebody is trying out dry-web for the first time
Oskar Szrajer
@gotar
yeah
first time I try to understand berg i finish writing those easier blog example to learn every step myself it was tooo much
Piotr Solnica
@solnic
probably the biggest challenge is to realize it’s not a full stack framework
and you’re putting together a custom stack
Oskar Szrajer
@gotar
yeah but if you don't know anything about dry, you see containers, inject, view ....
Piotr Solnica
@solnic
we can polish it easily and simplify many things, but it will never have a feeling of a full stack framework
ie “put this file with this name over here and magic will happen”
Oskar Szrajer
@gotar
and you finish knowing or understanding nothing
yeah. I'm ok with that, we just need more examples and docs
Piotr Solnica
@solnic
right, accepting the fact we isolate global state in containers is probably step #1 :D
Oskar Szrajer
@gotar
so it's a step in good direction - blog example
@timriley hmm in new dry-view how to access Page those assets, csfr_token ?or those whole class should be dropped and moved to those new controller?
Piotr Solnica
@solnic
IIRC all methods provided by the context object are available in templates
basically context == global template api
Oskar Szrajer
@gotar
yeah I have setting :context, Container["page"]
and do not work with page.assets or just assets, for just assets drop error,. no key found like assets
like in template layout:
== csrf_metatag
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)