These are chat archives for dry-rb/chat

9th
Feb 2017
Tim Riley
@timriley
Feb 09 2017 03:43
@gotar I'll check that out now, I'm pretty sure I added those
@gotar do you have a YourApp::Container[:notifications]?
Thanks @AMHOL :D
Oskar Szrajer
@gotar
Feb 09 2017 07:48
[5] pry(main)> Athit::Container["notifications"] => #<Dry::Monitor::Notifications:0x0055aae85b7d70 @clock=#<Dry::Monitor::Clock:0x0055aae84c91c0>, @events= {:"rack.request.start"=>#<Dry::Monitor::Event:0x0055aae85b7618 @id=:"rack.request.start", @info={}>, :"rack.request.stop"=>#<Dry::Monitor::Event:0x0055aae85b7578 @id=:"rack.request.stop", @info={}>, :"rack.request.error"=>#<Dry::Monitor::Event:0x0055aae85b74b0 @id=:"rack.request.error", @info={}>, :sql=>#<Dry::Monitor::Event:0x0055aae99ccc20 @id=:sql, @info={}>}, @id=:core, @listeners= {:"rack.request.start"=> [#<Proc:0x0055aae85b6b28@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:33>], :"rack.request.stop"=> [#<Proc:0x0055aae85b6a88@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:37>], :"rack.request.error"=> [#<Proc:0x0055aae85b6948@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/rack/logger.rb:41>], :sql=>[#<Proc:0x0055aae99ccbd0@/home/gotar/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/dry-monitor-0.0.2/lib/dry/monitor/sql/logger.rb:29>]}> [6] pry(main)>
@timriley ^
yes I have
Tim Riley
@timriley
Feb 09 2017 09:10
@gotar odd! Would you mind sharing a full stack trace for me?
Oskar Szrajer
@gotar
Feb 09 2017 09:12
[5] pry(main)> Main::Container["persistence.repositories.users"][1] NoMethodError: undefined method `instrument' for nil:NilClass from /home/gotar/Programowanie/Athit/lib/rom/instrumentation.rb:14:in `to_a
that's all
those 14 line is: notifications.instrument(:sql, name: name.relation, query: dataset.sql)
and notifications are just nil
Piotr Rybarczyk
@Argonus
Feb 09 2017 13:58
Hi, i am using dry-validation and dry-struc gems in project. But i see a problem with boolean values in params, i am receiving it as 'true' or 'false', and bool? validation fails. I need to map them or i just cant find some info in documentation
Nikita Shilnikov
@flash-gordon
Feb 09 2017 13:59
@Argonus you need to use Dry::Validation.Form for such coercions
Piotr Rybarczyk
@Argonus
Feb 09 2017 14:00
@flash-gordon Thanks, i had to be blind...