Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nicolas Viennot
    @nviennot
    and we can't monkey patch it due to that anonymous lambda
    haha :D
    Jeroen Visser
    @jeroenvisser101
    Yeah, it's what I wanted to do first, but then I gave up and proxied update_attribute to update_attributes in my User model instead
    henricus louwhoff
    @hl
    Maybe we can add a comment to the PR as well Jeroentje
    Nicolas Viennot
    @nviennot
    @hl, do it if they fight, or if the PR is ignored for a couple of days
    Jeroen Visser
    @jeroenvisser101
    Let's give them a little time to reply :)
    Otherwise it might seem to push-y
    henricus louwhoff
    @hl
    ok ;)
    Jeroen Visser
    @jeroenvisser101
    FYI: lucasmazza seems the most likely to reply, he seems to be the most active in the last couple of days
    Btw, @nviennot, I'm not sure about save(validate: false). Even though that would prevent breaking existing functionality, I'm not sure if that (the validate: false) is supported by all the ORMs Devise supports
    Anyway, for now, it seems to pass both Mongoid and AR
    Nicolas Viennot
    @nviennot
    it's used everywhere
    in devise
    Jeroen Visser
    @jeroenvisser101
    Ah, I see, then it should be completely fine :D
    Nicolas Viennot
    @nviennot
    yes :)
    Nicolas Viennot
    @nviennot
    merged! plataformatec/devise#4194
    henricus louwhoff
    @hl
    @nviennot Nice!
    Jeroen Visser
    @jeroenvisser101
    :boom:
    Now to wait for a new version release :)
    Jeroen Visser
    @jeroenvisser101
    Hey @nviennot, would you accept a PR that adds GlobalID support to NoBrainer? I'm looking to make it possible, and if you would be interested, I can turn it into a PR :)
    Nicolas Viennot
    @nviennot
    @jeroenvisser101 I feel like this would be best to put in a separate gem
    Jeroen Visser
    @jeroenvisser101
    Right, might also be a documentation thing, since it is (or should be) ~4 lines of code
    if defined?(Mongoid)
      Mongoid::Document.send(:include, GlobalID::Identification)
      Mongoid::Relations::Proxy.send(:include, GlobalID::Identification)
    end
    So I guess I could do something similar with NoBrainer and create a PR to the documentation?
    Nicolas Viennot
    @nviennot
    even if it's 4 lines of code, having a gem is best thing here I think
    Jeroen Visser
    @jeroenvisser101
    Sure, I can do that :)
    Nicolas Viennot
    @nviennot
    cool
    I'll add it to http://nobrainer.io/docs/3rd_party_integration/ once you have it :)
    Jeroen Visser
    @jeroenvisser101
    Nice :)
    Can Edremitoglu
    @cantonic
    hello everyone
    I am trying to figure out how to populate my test db using nobrainer. Fixtures seem not working and I need an easy way to create some records quickly when writing tests.
    Nicolas Viennot
    @nviennot
    @cantonic you can use factory girl
    Can Edremitoglu
    @cantonic
    nice. thx @nviennot
    Jeroen Visser
    @jeroenvisser101
    hey, when using multiple nodes for creation, it can happen that Model.last will not be the last record (because of the entropy in the ID that's reserved for the machine id)
    Nicolas Viennot
    @nviennot
    @jeroenvisser101 I don't think so
    Jeroen Visser
    @jeroenvisser101
    Hmm, I thought I experienced this. I'll try to write a simple script to replicate
    I'm looking at the logic, and it mentions this:
          # more noise is better in the ID, but we prefer to avoid
          # wrapping the sequences so that Model.last on a single
          # machine returns the latest created document.
    it specifically mentions 'single machine' there
    anyway, will try to make it reproducable
    the first 30 bits are the timestamp
    so on multi-nodes, assuming your clocks are synchronized, Model.last will return a document that was created in the last second where a document was created
    Jeroen Visser
    @jeroenvisser101
    right, I would think so as well, maybe it's something else, I'll investigate
    André Freitas
    @andrefreitas
    Hi, Nobrainer is doing an implicit order by query
    That crashes when we have more than 100.000 documents
    how can I disable this order by?
    André Freitas
    @andrefreitas
    ups, I found it in the documentation: criteria.without_ordering
    :D