<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for mokkol</title><link>http://disqus.com/by/mokkol/</link><description></description><atom:link href="http://disqus.com/mokkol/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 11 Dec 2017 04:59:47 -0000</lastBuildDate><item><title>Re: Back on the road - Ruby on Wheels</title><link>https://ruby-on-wheels.github.io/blog/back-on-the-road/#comment-3656717068</link><description>&lt;p&gt;Sounds awesome Jakob! Keep it up!!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Mon, 11 Dec 2017 04:59:47 -0000</pubDate></item><item><title>Re: 
        Versioning a Rails API
        
    </title><link>http://chriskottom.com/blog/2017/04/versioning-a-rails-api/#comment-3624564690</link><description>&lt;p&gt;Answering my own question. You can set namespace in the render function: &lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;  render json: entity, namespace: ::V2&lt;br&gt;&lt;/code&gt;&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;or you can add a before_action in your Api Controller.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;  &lt;code&gt;&lt;br&gt;    before_action: :set_namespace&lt;br&gt;&lt;br&gt;    private&lt;br&gt;&lt;br&gt;    def set_namespace&lt;br&gt;      self.namespace_for_serializer = ::V2&lt;br&gt;    end&lt;br&gt;&lt;br&gt;  &lt;/code&gt;&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;It will magically check if there is a Api::V2::EntitySerializer present and fall back on the default if it doesn't exist.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Mon, 20 Nov 2017 06:34:39 -0000</pubDate></item><item><title>Re: 
        Versioning a Rails API
        
    </title><link>http://chriskottom.com/blog/2017/04/versioning-a-rails-api/#comment-3624540094</link><description>&lt;p&gt;Hi Chris,&lt;/p&gt;&lt;p&gt;Great stuff, has been really helpful. A quick question, how would you specify the versioned serializers in the controller?&lt;/p&gt;&lt;p&gt;At the moment I have something like this: `render json: entity, serializer: ::V2::EntitySerializer`&lt;/p&gt;&lt;p&gt;I specify the serializer in each controller action. Ideally it should figure out the right version magically.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Mon, 20 Nov 2017 06:00:40 -0000</pubDate></item><item><title>Re: Mac as IDE</title><link>http://firedev.com/posts/2015/mac-as-ide/#comment-2338782127</link><description>&lt;p&gt;Hi Nick, awesome list! I hate the mouse as well and one addition I would like to add is the Vimium Google extension. You can navigate/scroll etc with Vi commands.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Mon, 02 Nov 2015 06:48:35 -0000</pubDate></item><item><title>Re: The biggest struggle for any new SaaS</title><link>http://nathanpowell.me/blog/biggest-struggle-saas/#comment-2051282697</link><description>&lt;p&gt;Doesn't work for everything :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Fri, 29 May 2015 06:58:01 -0000</pubDate></item><item><title>Re: Converting a Rails Database From MySQL to PostgreSQL</title><link>http://vermicel.li/blog/2010/02/04/converting-a-rails-database-from-mysql-to-postgresql.html#comment-38548348</link><description>&lt;p&gt;i dont like the if loop in the ActiveRecord finds so I fixed the random() issue in the following way:&lt;/p&gt;&lt;p&gt;Add this to your lib:&lt;br&gt;&lt;code&gt;&lt;br&gt;module AgnosticRandom&lt;br&gt;  def random&lt;br&gt;    case DB_ADAPTER&lt;br&gt;      when "mysql" then "RAND()"&lt;br&gt;      when "postgresql" then "RANDOM()"&lt;br&gt;    end&lt;br&gt;  end&lt;br&gt;end&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Add the DSB_ADAPTER in your environment. So you can have mysql in your development and postgresql in your production.&lt;/p&gt;&lt;p&gt;add this in the initializers directory: extent_ar.rb&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;ActiveRecord::Base.extend AgnosticRandom&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Now you can make the queries like this:&lt;br&gt;&lt;code&gt;&lt;br&gt;OurModel.find(:all, :conditions =&amp;gt; ["value &amp;lt; ?", @max_wanted_value],&lt;br&gt;              :order =&amp;gt; ActiveRecord::Base.random,&lt;br&gt;	      :limit =&amp;gt; 50)&lt;br&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Mon, 08 Mar 2010 08:44:24 -0000</pubDate></item><item><title>Re: remi :: Having Fun with Ruby Blocks</title><link>http://remi.org/2010/02/21/having-fun-with-ruby-blocks#comment-36278287</link><description>&lt;p&gt;Hey thanks for this screencast! Learnt a lot!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Wed, 24 Feb 2010 08:14:46 -0000</pubDate></item><item><title>Re: How to double your productivity - Lars Pind</title><link>http://pinds.com/2008/11/26/how-to-double-your-productivity#comment-4799142</link><description>&lt;p&gt;Hey Lars,&lt;/p&gt;&lt;p&gt;I forgot to give some feedback on my last comment. I think that one thing is missing in your screencasts which is proper food. Specially breakfast helps a lot to be able to think more productive. It will be easier to focus better and serializing will be easier. In my last job, the programmers always ate breakfast during lunch and that is just a waste of energy. Just go half an hour earlier to bed and wake up half an hour earlier. Take care of yourself! Dont eat breakfast in the train or car. Give yourself the time to wake up! Also for the lunch and dinner. Dont buy fastfood everyday. (Specially americans are good in that). Take care of yourself, take the time to actually make the food, proper healthy food which gives you enough energy and you have less change to become sick or feeling badly&lt;/p&gt;&lt;p&gt;With that tip and your tips would make me a better man :)&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Michael&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Koper</dc:creator><pubDate>Wed, 31 Dec 2008 11:41:24 -0000</pubDate></item></channel></rss>