David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said over 8 years ago on Reports with charts :

Have a look at this episode to see if it covers your questions.

https://www.driftingruby.com/episodes/charts-and-graphs


David Kimura PRO said over 8 years ago on UUID in Rails with ActiveUUID :

You could use a UUID for this, but I think that it would probably be a bit overkill.

I would personally just do something like this with SecureRandom.hex (which is part of the ruby core)

        before_create :populate_subscriber_id
        private
        def populate_subscriber_id
          begin
            self.subscriber_id = SecureRandom.hex
          end while self.class.exists?(subscriber_id: subscriber_id)
        end

David Kimura PRO said over 8 years ago on Benchmarking and Refactoring the content_for View Helper :

Since the difference was so minimal, it was probably something to do with the host environment. If it were X times slower, it would be a bit strange and cause for alarm, but I could have had a number of things running on the mac which created the slight differences.


David Kimura PRO said over 8 years ago on Benchmarking and Refactoring the content_for View Helper :

Yes. I've used similar things from this episode on some projects. My breadcrumbs were a bit different so the markup changed a bit, but the overall concept is the same. I've used similar approaches on SEO data as well (page titles and descriptions).


David Kimura PRO said over 8 years ago on DataTables :

Really cool! Another idea for your gem, allow a block with the listing of columns. Kind of like a small DSL for the ordering and selection of columns. 

I've been working on a project which takes the ideas of the Datatables and is basically a full rewrite; allowing pagination, individual column searching, column selection and ordering, saving custom reports and setting defaults, etc. It's a pretty large library so far, but not ready to share with the world.