<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>dospuntocero</title><generator>Tumblr (3.0; @2puntocero)</generator><link>http://blog.dospuntocero.com.mx/</link><item><title>S3 Problems</title><description>&lt;p&gt;After encountering this problem &lt;pre&gt;Errno::EPIPE: Broken pipe&lt;/pre&gt; while trying to upload a file through the console using Paperclip or Carrierwave and also trying using Fog directly, I found out that the local request being sent to S3 was being rejected.
&lt;br/&gt;
Then while trying different options I figured that ruby was calling openssl, so why not disable this and see what happened&amp;#8230; and lo and behold it worked!
&lt;br/&gt;
So for everyone out there just remember to add &lt;pre&gt;:use_ssl =&amp;gt; false&lt;/pre&gt; in this case if you&amp;#8217;re using Paperclip in your model like so:
&lt;pre&gt;
has_attached_file :doc,
  :path =&amp;gt; "attachments/:id/:style/:basename.:extension",
  :storage =&amp;gt; :s3,
  :s3_credentials =&amp;gt; "#{Rails.root.to_s}/config/s3.yml",
  :use_ssl =&amp;gt; false
&lt;/pre&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/18820554181</link><guid>http://blog.dospuntocero.com.mx/post/18820554181</guid><pubDate>Mon, 05 Mar 2012 20:06:26 -0500</pubDate></item><item><title>Model default values</title><description>&lt;p&gt;When looking for the best way to make default values, I&amp;#8217;ve found that you shouldn&amp;#8217;t rely on the DB for these. So in order to integrate these on your Model, I usually follow the next best practive:&lt;/p&gt;

&lt;pre&gt;&lt;div class="line" id="LC1"&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;    &lt;span class="n"&gt;after_initialize&lt;/span&gt; &lt;span class="ss"&gt;:init&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;init&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;      &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;  &lt;span class="o"&gt;||=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;    &lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;  &lt;span class="k"&gt;end&lt;/span&gt; &lt;/div&gt;&lt;/pre&gt;

&lt;p&gt;This way it will initialize to 0.0 if the value is nil&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/12857069005</link><guid>http://blog.dospuntocero.com.mx/post/12857069005</guid><pubDate>Tue, 15 Nov 2011 19:12:26 -0500</pubDate></item><item><title>Custom Validation (twitter bootstrap checkbox). Part 2</title><description>&lt;p&gt;After creating the custom input on &lt;a href="http://blog.dospuntocero.com.mx/post/11454654022/custom-validation-twitter-bootstrap-checkbox"&gt;Part 1&lt;/a&gt;, we now needed to include a custom getter for each of these inputs. We could set up a method for each input inside our model but that wouldn&amp;#8217;t be as cool, so we create a gem with the following behavior:
&lt;/p&gt;

&lt;pre&gt;
Object.instance_eval do 
   def check_for_check( *attrs )
       attrs.each do | attr |
           self.class_eval %Q{
                def #{attr}
                    #{attr}_check ? read_attribute(:#{attr}) : 0
                end
           }
       end
   end
end
&lt;/pre&gt;

&lt;p&gt;This will make it so that we only have to add this to our model:&lt;/p&gt;

&lt;pre&gt;
check_for_check :foo, :bar
&lt;/pre&gt;</description><link>http://blog.dospuntocero.com.mx/post/12000514133</link><guid>http://blog.dospuntocero.com.mx/post/12000514133</guid><pubDate>Thu, 27 Oct 2011 16:06:53 -0400</pubDate></item><item><title>Custom Input with Twitter Bootstrap</title><description>&lt;p&gt;Using &lt;a href="http://github.com/plataformatec/simple_form"&gt;simple_form&lt;/a&gt; and &lt;a href="http://twitter.github.com/bootstrap/"&gt;Twitter&amp;#8217;s bootstrap&lt;/a&gt; we can implement a custom input for the prepend left box used in bootstrap.
&lt;br/&gt;&lt;br/&gt;
First you create an inputs folder under your app directory and then a file named &lt;b&gt;left_box_input.rb&lt;/b&gt; with the following code:

&lt;pre&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LeftBoxInput&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;SimpleForm&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Inputs&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;    &lt;span class="s2"&gt;"&amp;lt;div class='input-prepend'&amp;gt;&amp;lt;span class='add-on'&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:symbol&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@builder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text_field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attribute_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input_html_options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/div&amp;gt;"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html_safe&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;br/&gt;&lt;/div&gt;&lt;/pre&gt;

Then in your views just call it the following way:
&lt;pre&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="ss"&gt;:foo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ss"&gt;:left_box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:symbol&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"2 + 2 ?"&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;

Then you will have in your views something like this:
&lt;br/&gt;&lt;img src="http://media.tumblr.com/tumblr_lt30bdqJIo1qz5mew.png"/&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/11570461811</link><guid>http://blog.dospuntocero.com.mx/post/11570461811</guid><pubDate>Mon, 17 Oct 2011 10:00:05 -0400</pubDate></item><item><title>Custom Validation (twitter bootstrap checkbox)</title><description>&lt;p&gt;After jumping the wagon with &lt;a href="http://twitter.github.com/bootstrap/"&gt;Twitter Bootstrap&lt;/a&gt; for a new client app we are working on, I found myself in to some problem trying to implement this type of input:
&lt;br/&gt;&lt;img src="http://media.tumblr.com/tumblr_lt2wdtiJHZ1qz5mew.png"/&gt;&lt;br/&gt;
We only have one input let&amp;#8217;s say &lt;b&gt;name&lt;/b&gt; and we wan&amp;#8217;t to validate it&amp;#8217;s presence when the check is true. The check is a virtual attribute named &lt;b&gt;name_check&lt;/b&gt;. So using &lt;a href="https://github.com/plataformatec/simple_form"&gt;simple_form&lt;/a&gt; gem for this form.
&lt;br/&gt;
We need to create the custom input element first, we do this by creating an &lt;b&gt;inputs&lt;/b&gt; folder under the &lt;b&gt;app&lt;/b&gt; folder. We name our file &lt;b&gt;prepend_checkbox_input.rb&lt;/b&gt;

&lt;pre&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PrependCheckboxInput&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;SimpleForm&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Inputs&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;    &lt;span class="s2"&gt;"&amp;lt;div class='input-prepend'&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&lt;span class="s2"&gt;      &amp;lt;label class='add-on active' title='&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:tooltip&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;' rel='tooltip' &amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="s2"&gt;        &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@builder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;check_box&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attribute_name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_s&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;'_check'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;span class="s2"&gt;      &amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;&lt;span class="s2"&gt;      &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="vi"&gt;@builder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text_field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attribute_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="n"&gt;input_html_options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC8"&gt;&lt;span class="s2"&gt;      &amp;lt;span class='help-inline'&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC9"&gt;&lt;span class="s2"&gt;        &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:help&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC10"&gt;&lt;span class="s2"&gt;      &amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC11"&gt;&lt;span class="s2"&gt;    &amp;lt;/div&amp;gt;"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html_safe&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC12"&gt;  &lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC13"&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC14"&gt;&lt;br/&gt;&lt;/div&gt;&lt;/pre&gt;

The input will include an option for tooltip, it will automatically append &amp;#8216;_check&amp;#8217; to the name of the input to create the check box element, the text field with all the regular HTML options and a help line under it.
&lt;br/&gt;
This will be how we call it under our views:
&lt;pre&gt;&lt;div class="line" id="LC1"&gt;  &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:as&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ss"&gt;:prepend_checkbox&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:tooltip&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Has name?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:help&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Please insert your name"&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;

Now we include validations, for custom validators we need implement this one under our initializers:
&lt;pre&gt;
ActiveRecord::Base.class_eval do
  def self.validates_checkbox(*attrs)
    attrs.each do |attr_name|
    validates attr_name, :presence =&amp;gt; true, :if =&amp;gt; "#{attr_name.to_s + '_check'} == '1'" 
    end
  end
end
&lt;/pre&gt;
&lt;br/&gt;
We user &lt;b&gt;*attrs&lt;/b&gt; as our input so that we can declare our validations on a single line like so:
&lt;br/&gt;&lt;pre&gt;
 validates_checkbox :name, :phone, :number
&lt;/pre&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/11454654022</link><guid>http://blog.dospuntocero.com.mx/post/11454654022</guid><pubDate>Fri, 14 Oct 2011 19:42:00 -0400</pubDate></item><item><title>Rails 3.1 custom serialize</title><description>&lt;p&gt;A new feature that really makes our lives easier is the custom serialize option. Let&amp;#8217;s say that your DB requires that when you save a serializable attribute to be in a CSV form instead of the YAML default.
&lt;br/&gt;&lt;br/&gt;
If this is the case then you could use the following
&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;
  class CommaSeparatedList
    def load(text)
      return unless text
      text.split(",")
    end

    def dump(text)
      text.join(",")
    end
  end
&lt;/pre&gt;
&lt;br/&gt;&lt;br/&gt;
So after creating this class you just call it as a parameter in your serialize call
&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;
  serialize :names, CommaSeparatedList.new
&lt;/pre&gt;
&lt;br/&gt;&lt;br/&gt;
In this way the next time you save to your DB your data will be stored in CSV form.&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/9084749237</link><guid>http://blog.dospuntocero.com.mx/post/9084749237</guid><pubDate>Thu, 18 Aug 2011 13:16:47 -0400</pubDate></item><item><title>Rails 3.1 asset pipeline</title><description>&lt;p&gt;When you&amp;#8217;re trying out the new asset pipeline it &lt;strike&gt;might&lt;/strike&gt; will be hard to debug any CSS/JS since it will all be compressed in to one file.
&lt;br/&gt;&lt;br/&gt;
When you use the link/include tag remember to add the next parameter 
&lt;br/&gt;&lt;pre&gt;
stylesheet_link_tag :admin, :debug =&amp;gt; Rails.env.development?
javascript_include_tag :admin, :debug =&amp;gt; Rails.env.development?
&lt;/pre&gt;
&lt;br/&gt;
This way it will only server the files separately when in development mode.&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/8783831487</link><guid>http://blog.dospuntocero.com.mx/post/8783831487</guid><pubDate>Thu, 11 Aug 2011 13:33:06 -0400</pubDate></item><item><title>Installing Rails 3.1 --pre on OSX Lion</title><description>&lt;p&gt;After trying several ways of doing
&lt;pre&gt;
gem install rails --pre
&lt;/pre&gt;
and still getting errors, I found the following to do the trick
&lt;pre&gt;
rvm gemset rails --pre
&lt;/pre&gt;
It will save you a couple of hours.&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/8754806024</link><guid>http://blog.dospuntocero.com.mx/post/8754806024</guid><pubDate>Wed, 10 Aug 2011 20:02:50 -0400</pubDate></item><item><title>Paperclip Scopes</title><description>&lt;p&gt;A nifty pair of scopes for when you&amp;#8217;re working with attachments on Paperclip that are images or other type of content.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;
&lt;pre&gt;&lt;span class="c1"&gt;# For finding images as in Article.attachments.images &lt;/span&gt;&lt;span class="c1"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span class="n"&gt;scope&lt;/span&gt; &lt;span class="ss"&gt;:images&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"file_content_type LIKE ?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"image%"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span class="c1"&gt;# For finding other files Article.attachments.docs&lt;/span&gt;&lt;span class="c1"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span class="n"&gt;scope&lt;/span&gt; &lt;span class="ss"&gt;:docs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"file_content_type NOT LIKE ?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"image%"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/4598696136</link><guid>http://blog.dospuntocero.com.mx/post/4598696136</guid><pubDate>Wed, 13 Apr 2011 23:29:00 -0400</pubDate></item><item><title>New Stickers</title><description>&lt;p&gt;We are getting new stickers for our friends and clients who want to put them in the laptops/cars/bathroom stalls.&lt;/p&gt;
&lt;p&gt;Here is a preview, get them while they&amp;#8217;re hot.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" alt="Sticker" src="http://c0013564.cdn1.cloudfiles.rackspacecloud.com/x2_398ba2c"/&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/2833207418</link><guid>http://blog.dospuntocero.com.mx/post/2833207418</guid><pubDate>Wed, 19 Jan 2011 18:48:36 -0500</pubDate></item><item><title>My favorite Spec of the day</title><description>&lt;p&gt;Here is the controller spec!&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;notify&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="nf"&gt; &lt;/span&gt;&lt;span class="vi"&gt;&lt;span&gt;	&lt;/span&gt;@user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:id&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="p"&gt; &lt;/span&gt;&lt;span class="k"&gt;&lt;span&gt;&lt;span&gt;	&lt;/span&gt;&lt;/span&gt;if&lt;/span&gt; &lt;span class="vi"&gt;@user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_expert?&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;/span&gt;&lt;span class="vi"&gt;&lt;span&gt;	&lt;span&gt;	&lt;/span&gt;&lt;/span&gt;@topic&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;experts&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="vi"&gt;@user&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="vi"&gt;&lt;/span&gt;&lt;span class="k"&gt;&lt;span&gt;&lt;span&gt;	&lt;/span&gt;&lt;/span&gt;end&lt;/span&gt;  &lt;span class="vi"&gt;@&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="vi"&gt;&lt;span&gt;	&lt;/span&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;notify_about_topic!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vi"&gt;@topic&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="p"&gt;&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;br/&gt;&lt;/pre&gt;
&lt;!-- &lt;mce:script _mce_src="https://gist.github.com/713016.js?file=gistfile1.rb"&gt;&lt;/mce:script&gt; --&gt;
&lt;p&gt;And the implementation&lt;/p&gt;
&lt;!-- &lt;mce:script _mce_src="https://gist.github.com/713983.js?file=gistfile1.rb"&gt;&lt;/mce:script&gt; --&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s1"&gt;'should notify user and add to leader board if user is an expert'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mock_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;User&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:is_expert?&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;topic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mock_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;collection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'col'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;collection&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should_receive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;topic&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should_receive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:experts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;and_return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should_receive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:notify_about_topic!&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="no"&gt;&lt;span&gt;	&lt;/span&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should_receive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:find&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;and_return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="no"&gt;&lt;span&gt;	&lt;/span&gt;Topic&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should_receive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:find&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;and_return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;post&lt;/span&gt; &lt;span class="ss"&gt;:notify&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:topic_id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;topic&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:format&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'js'&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;response&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="n"&gt;be_succes&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;span&gt;	&lt;/span&gt;assigns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="n"&gt;&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Isn&amp;#8217;t this nice to have completely decoupled specs from other outside logic, isn&amp;#8217;t Rspec and TDD great?&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/1665183738</link><guid>http://blog.dospuntocero.com.mx/post/1665183738</guid><pubDate>Tue, 23 Nov 2010 21:56:00 -0500</pubDate></item><item><title>bullshit:

jimray:

The new 37 Signals office looks like it...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_la5mcxtC8X1qz4s19o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://bullshit.tumblr.com/post/1296598735/jimray-the-new-37-signals-office-looks-like-it"&gt;bullshit&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://jimray.tumblr.com/post/1295601753/the-new-37-signals-office-looks-like-it-belongs-on"&gt;jimray&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The new &lt;a href="http://37signals.com/svn/posts/2593-official-pictures-of-our-new-office"&gt;37 Signals office&lt;/a&gt; looks like it belongs on &lt;a href="http://37signals.com/svn/posts/2593-official-pictures-of-our-new-office"&gt;Unhappy Hipsters&lt;/a&gt;. Eating-lunch-all-by-himself-DHH is the new &lt;a href="http://knowyourmeme.com/memes/keanu-is-sad-sad-keanu"&gt;Sad Keanu&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Look at all the things he’s &lt;em&gt;not&lt;/em&gt; eating. (&lt;a href="http://rubyonrails.ytmnd.com/"&gt;reference&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.dospuntocero.com.mx/post/1402543366</link><guid>http://blog.dospuntocero.com.mx/post/1402543366</guid><pubDate>Mon, 25 Oct 2010 21:08:18 -0400</pubDate></item><item><title>Mass Payment - Paypal</title><description>&lt;p&gt;When trying to figure out how to send multiple payments to different Paypal users, I stumbled into the Mass Payment feature.&lt;/p&gt;
&lt;p&gt;This feature allows to send multiple payments in one call but more importantly is that the only charge %2 of the payment cap at $1 USD. Also you can send the payments in multiple currencies.&lt;/p&gt;
&lt;p&gt;After digging around the web there wasn&amp;#8217;t any post about how to make use of this feature using Ruby&amp;#8230; that is after diving deep into ActiveMerchant&amp;#8217;s documentation that I found the following:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;
&lt;pre&gt;&lt;span class="n"&gt;gateway&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transfer&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'bob@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="ss"&gt;:subject&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"The money I owe you"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:note&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Sorry it's so late"&lt;/span&gt;&lt;br/&gt;  &lt;span class="n"&gt;gateway&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transfer&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'fred@example.com'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2450&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'wilma@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:note&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'You will receive another payment on 3/24'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'barney@example.com'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="ss"&gt;:subject&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Your Earnings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:note&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Thanks for your business."&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You gotta love ruby! and thanks ActiveMerchant&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="method-args"&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/pre&gt;</description><link>http://blog.dospuntocero.com.mx/post/939531981</link><guid>http://blog.dospuntocero.com.mx/post/939531981</guid><pubDate>Wed, 11 Aug 2010 20:33:00 -0400</pubDate></item><item><title>Rails 3 + Metal</title><description>&lt;p&gt;There has been a lot of talk about the new changes being introduced into rails 3, trying to upgrade current applications I found out a recipe for upgrading your Metal code:&lt;/p&gt;
&lt;p&gt;The first thing is to change&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; line-height: 16px; font-size: 12px; white-space: pre;"&gt;&lt;span style="line-height: 1.4em; color: #0086b3; padding: 0px; margin: 0px;" class="nb"&gt;require&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;(&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #008080; padding: 0px; margin: 0px;" class="no"&gt;File&lt;/span&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;.&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="n"&gt;dirname&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;(&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #999999; padding: 0px; margin: 0px;" class="bp"&gt;__FILE__&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;)&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;+&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8221;/../../config/environment&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;)&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="k"&gt;unless&lt;/span&gt; &lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="n"&gt;defined?&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;(&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #008080; padding: 0px; margin: 0px;" class="no"&gt;Rails&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;into&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; line-height: 16px; font-size: 12px; white-space: pre;"&gt;&lt;span style="line-height: 1.4em; color: #0086b3; padding: 0px; margin: 0px;" class="nb"&gt;require&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #008080; padding: 0px; margin: 0px;" class="no"&gt;File&lt;/span&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;.&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="n"&gt;expand_path&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;(&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s1"&gt;&amp;#8217;../../../config/environment&amp;#8217;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;,&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #999999; padding: 0px; margin: 0px;" class="bp"&gt;__FILE__&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;)&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="k"&gt;unless&lt;/span&gt; &lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="n"&gt;defined?&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;(&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #008080; padding: 0px; margin: 0px;" class="no"&gt;Rails&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This way using the new system for the absolute path to your app.&lt;/p&gt;
&lt;p&gt;Next depending on the function of your app you should change&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; line-height: 16px; font-size: 12px; white-space: pre;"&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;[&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #009999; padding: 0px; margin: 0px;" class="mi"&gt;404&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;,&lt;/span&gt; &lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;{&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;Content-Type&amp;#8221;&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;text/html&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;},&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;[&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;Not Found&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;]]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;in to&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; line-height: 16px; font-size: 12px; white-space: pre;"&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;[&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #009999; padding: 0px; margin: 0px;" class="mi"&gt;404&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;,&lt;/span&gt; &lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;{&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;Content-Type&amp;#8221;&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;text/html&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;,&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;X-Cascade&amp;#8221;&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;pass&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;},&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;[&lt;/span&gt;&lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s2"&gt;&amp;#8220;Not Found&amp;#8221;&lt;/span&gt;&lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;]]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This &amp;#8221;X-Cascade&amp;#8221; =&amp;gt; &amp;#8220;pass&amp;#8221; allows for the call to keep going through your routes and see if any other catches this call.&lt;/p&gt;
&lt;p&gt;Last is to declare your action on the router, this wasn&amp;#8217;t necessary on Rails 2 since Metal would go through Rack before Rails, but now that Rails is an actual Rack app, we need to express all of our routes.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; line-height: 16px; font-size: 12px; white-space: pre;"&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="n"&gt;match&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #dd1144; padding: 0px; margin: 0px;" class="s1"&gt;&amp;#8216;/metal_path&amp;#8217;&lt;/span&gt;&lt;span style="line-height: 1.4em; padding: 0px; margin: 0px;" class="p"&gt;,&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #990073; padding: 0px; margin: 0px;" class="ss"&gt;:to&lt;/span&gt; &lt;span style="line-height: 1.4em; font-weight: bold; padding: 0px; margin: 0px;" class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="line-height: 1.4em; color: #008080; padding: 0px; margin: 0px;" class="no"&gt;MetalClass&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/751409956</link><guid>http://blog.dospuntocero.com.mx/post/751409956</guid><pubDate>Tue, 29 Jun 2010 19:28:00 -0400</pubDate></item><item><title>La Vitrine</title><description>&lt;p&gt;Moment Factory developed the interactive system and designed the interactive content.&lt;/p&gt;
&lt;p&gt;The installation includes tracking devices and low-resolution LED displays and is capable of showing many different visualizations based on the presence and movement of people.&lt;/p&gt;
&lt;p&gt;
&lt;object width="640" height="385"&gt;
&lt;param name="movie" value="http://www.youtube.com/v/6xriYUzJ9Ls&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/6xriYUzJ9Ls&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Visitors can interact with the installation every night from 7 PM to 11 PM.&lt;br/&gt;&lt;strong&gt;La Vitrine&lt;/strong&gt;&lt;br/&gt;&lt;em&gt;145, rue Sainte-Catherine Ouest, Montréal.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/492073238</link><guid>http://blog.dospuntocero.com.mx/post/492073238</guid><pubDate>Fri, 02 Apr 2010 19:57:50 -0400</pubDate></item><item><title>go: flag</title><description>&lt;a href="http://golang.tumblr.com/post/439732032/flag"&gt;go: flag&lt;/a&gt;: &lt;blockquote&gt;
&lt;p&gt;Checking out the &lt;a href="http://golang.org/pkg/flag/#PrintDefaults"&gt;flag package&lt;/a&gt;, Go’s built in command line argument parser. Here’s a simple example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// flag.go
package main import ( "flag" "fmt"
) var code *int = flag.Int("areacode", 716, "give me your codes") func main() { fmt.Printf("Testing out flags!\n"); flag.Parse();...&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;</description><link>http://blog.dospuntocero.com.mx/post/439772385</link><guid>http://blog.dospuntocero.com.mx/post/439772385</guid><pubDate>Wed, 10 Mar 2010 17:44:59 -0500</pubDate></item><item><title>Rails Tutorial</title><description>&lt;a href="http://www.railstutorial.org/"&gt;Rails Tutorial&lt;/a&gt;: &lt;p&gt;For all new comers to RAILS please do check it out.&lt;/p&gt;
&lt;p&gt;Si eres nuevo en RAILS, este tutorial es el mejor.&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/288329544</link><guid>http://blog.dospuntocero.com.mx/post/288329544</guid><pubDate>Thu, 17 Dec 2009 22:02:07 -0500</pubDate></item><item><title>Tokio Cabinet</title><description>&lt;p&gt;Tokyo Cabinet resources&lt;/p&gt;
&lt;p&gt;&lt;a&gt;&lt;a href="http://1978th.net/tokyocabinet/index.html"&gt;http://1978th.net/tokyocabinet/index.html&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;official page and presentation (really dense)&lt;/p&gt;
&lt;p&gt;&lt;a&gt;&lt;a href="http://1978th.net/tokyocabinet/rubydoc/"&gt;http://1978th.net/tokyocabinet/rubydoc/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;cabinet rdoc&lt;/p&gt;
&lt;p&gt;&lt;a&gt;&lt;a href="http://openwferu.rubyforge.org/tokyo.html"&gt;http://openwferu.rubyforge.org/tokyo.html&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;install instructions, best way to learn is to play in the mud&lt;/p&gt;
&lt;p&gt;&lt;a&gt;&lt;a href="http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/"&gt;http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;relly good overview and performance analys of ruby Tokyo libraries&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/286818485</link><guid>http://blog.dospuntocero.com.mx/post/286818485</guid><pubDate>Wed, 16 Dec 2009 20:44:23 -0500</pubDate></item><item><title>Video de mi presentación para el sitio Pio.la sobre Mongo...</title><description>&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="325" id="utv358138" name="utv_n_977073"&gt;&lt;param name="flashvars" value="autoplay=false" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="src" value="http://www.ustream.tv/flash/video/2536578" /&gt;&lt;embed flashvars="autoplay=false" width="400" height="325" allowfullscreen="true" allowscriptaccess="always" id="utv358138" name="utv_n_977073" src="http://www.ustream.tv/flash/video/2536578" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Video de mi presentación para el sitio Pio.la sobre Mongo Mapper&lt;/p&gt;
&lt;script type="text/javascript"&gt;&lt;/script&gt;</description><link>http://blog.dospuntocero.com.mx/post/240853945</link><guid>http://blog.dospuntocero.com.mx/post/240853945</guid><pubDate>Wed, 11 Nov 2009 19:39:00 -0500</pubDate></item><item><title>Ideas</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_ksx13qqrfk1qzm8wfo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Ideas&lt;/p&gt;</description><link>http://blog.dospuntocero.com.mx/post/239551523</link><guid>http://blog.dospuntocero.com.mx/post/239551523</guid><pubDate>Tue, 10 Nov 2009 17:57:24 -0500</pubDate></item></channel></rss>

