<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>reinventar &#187; ruby</title>
	<atom:link href="http://reinventar.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://reinventar.com</link>
	<description>now with double the colour and flavor!</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remaking MBNet at Codebits</title>
		<link>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/</link>
		<comments>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 15:10:29 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[codebits]]></category>
		<category><![CDATA[mbnet]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=775</guid>
		<description><![CDATA[We&#8217;re participating once again on Codebits this year with the help of Bauke Schildt on the design. We&#8217;ve decided to try something diferent and create a proof-of-concept remake of the MBNet platform to show how it can be improved and adapted for todays time. MBNet is a portuguese service where you can create temporary virtual [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thinkorange.pt">We&#8217;re</a> participating once again on <a href="http://www.codebits.eu">Codebits</a> this year with the help of <a href="http://www.schildt.nl">Bauke Schildt </a>on the design.</p>
<p>We&#8217;ve decided to try something diferent and create a proof-of-concept remake of the MBNet platform to show how it can be improved and adapted for todays time.</p>
<div class="wide"><img class="alignleft size-medium wp-image-779" title="popup" src="http://reinventar.com/wp-content/uploads/2009/12/popup-236x300.png" alt="popup" width="236" height="300" /></div>
<p><span id="more-775"></span></p>
<p><a href="http://www.mbnet.pt">MBNet</a> is a portuguese service where you can create temporary virtual VISA cards with any amount of money you want. Yes, it&#8217;s very useful and important but the service isn&#8217;t updated since 2005.</p>
<p>So our objectives were:</p>
<ul>
<li>KISS!</li>
<li> Adapt design for todays needs</li>
<li>Better organization of information</li>
<li>Make use of stored data about your payments.</li>
</ul>
<p>We took care in simplifying some steps (like the payments pop-up) and improving the usefulness of the data that exists in the platform.</p>
<p>So now, you should be able to sort, filter and browse your data and use different visualization statistics.</p>
<div class="wide"><img class="alignleft size-medium wp-image-780" title="info" src="http://reinventar.com/wp-content/uploads/2009/12/info-300x55.png" alt="info" width="300" height="55" /></div>
<p>Project is done in Ruby on Rails, Mysql and jQuery. HTML/CSS is done using the 960gs. All in 24 hours. Some things are not completely functional. It&#8217;s a proof-of-concept. ;)</p>
<p>You can view the project online at <a href="http://mbnet.heroku.com" target="_blank">mbnet.heroku.com</a>.</p>
<p>Here&#8217;s some screenshots:</p>

<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/mbnet_statistics/' title='mbnet_statistics'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/mbnet_statistics-150x150.jpg" class="attachment-thumbnail" alt="mbnet_statistics" title="mbnet_statistics" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/mbnet_transactions/' title='mbnet_transactions'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/mbnet_transactions-150x150.jpg" class="attachment-thumbnail" alt="mbnet_transactions" title="mbnet_transactions" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/simple_mbnet/' title='simple_mbnet'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/simple_mbnet-150x150.jpg" class="attachment-thumbnail" alt="simple_mbnet" title="simple_mbnet" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/popup/' title='popup'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/popup-150x150.png" class="attachment-thumbnail" alt="popup" title="popup" /></a>
<a href='http://reinventar.com/2009/12/remaking-mbnet-at-codebits/info/' title='info'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/12/info-150x150.png" class="attachment-thumbnail" alt="info" title="info" /></a>

]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/12/remaking-mbnet-at-codebits/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>BaseApp Orange v3</title>
		<link>http://reinventar.com/2009/09/baseapp-orange-v3/</link>
		<comments>http://reinventar.com/2009/09/baseapp-orange-v3/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 19:02:08 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[baseapp-orange]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=664</guid>
		<description><![CDATA[Time has been scarce but I managed to save a little to update BaseApp Orange. BaseApp Orange is a fork from BaseApp in attempt to make it a more suitable backoffice and structure for my own projects but it might have something you like. It&#8217;s like I made a base for a cake and you [...]]]></description>
			<content:encoded><![CDATA[<p>Time has been scarce but I managed to save a little to update BaseApp Orange.</p>
<p>BaseApp Orange is a fork from BaseApp in attempt to make it a more suitable backoffice and structure for my own projects but it might have something you like. It&#8217;s like I made a base for a cake and you take care of the filling. :P</p>
<p>Anyway, here&#8217;s the main changes:</p>
<ul>
<li>app was updated to Rails 2.3.4</li>
<li>added New Relic Gem</li>
<li>added <a href="http://github.com/josevalim/inherited_resources/">inherited_resources</a> plugin which enabled me to reduce a lot of code in the REST admin controllers</li>
<li>cleaned up and improved admin theme and code</li>
<li>improved admin generator according to inherited_resources. After creating your model run script/generate adminator model_name</li>
<li>added iPhone style Checkboxes to admin theme. thanks to <a href="http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html">Thomas Reynolds</a>.</li>
<li>replaced FckEditor with TinyMCE. There should be a speed increase.</li>
</ul>
<p>The code for the project can be found at <a href="http://github.com/psousa/baseapp-orange">BaseApp Orange Github page.</a></p>
<p>Here&#8217;s some images:</p>
<div class="wide"><a href="http://reinventar.com/wp-content/uploads/2009/09/Picture-2.png"><img class="img-a alignleft size-medium wp-image-667" title="Picture 2" src="http://reinventar.com/wp-content/uploads/2009/09/Picture-2-300x124.png" alt="baseapp orange 1" width="300" height="124" /></a></div>
<div class="wide"><a href="http://reinventar.com/wp-content/uploads/2009/09/Picture-1.png"><img class="img-a alignleft size-medium wp-image-666" title="Picture 1" src="http://reinventar.com/wp-content/uploads/2009/09/Picture-1-300x170.png" alt="baseapp orange 2" width="300" height="170" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/09/baseapp-orange-v3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ruby meetup @ lisbon</title>
		<link>http://reinventar.com/2009/06/ruby-meetup-lisbon/</link>
		<comments>http://reinventar.com/2009/06/ruby-meetup-lisbon/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 20:23:48 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=639</guid>
		<description><![CDATA[Tomorrow there&#8217;s a Ruby and Ruby on Rails meetup in Lisbon. If you want to meet with fellow rubyists and share some insights, knowledge or simply have a nice coffee then join us at the Liberdade 229 space. If you want to take public transportation, you can take the 732, 727, 720 728 buses that [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow there&#8217;s a Ruby and Ruby on Rails meetup in Lisbon.</p>
<p><a href="http://reinventar.com/wp-content/uploads/2009/06/picture-12.png"><img class="alignleft size-medium wp-image-640 img-a" title="picture-12" src="http://reinventar.com/wp-content/uploads/2009/06/picture-12-300x281.png" alt="picture-12" width="180" height="169" /></a></p>
<p>If you want to meet with fellow rubyists and share some insights, knowledge or simply have a nice coffee then join us at the <a href="www.liberdade229.com" target="_blank">Liberdade 229</a> space. If you want to take public transportation, you can take the 732, 727, 720 728 buses that stop nearby (you have to walk a bit but it&#8217;s good for you) or the leave at the Marques de Pombal subway station.</p>
<p>You can find more info about the event at the<a href="http://upcoming.yahoo.com/event/2960204" target="_blank"> upcoming.org page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/06/ruby-meetup-lisbon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby nos Aliados</title>
		<link>http://reinventar.com/2009/05/ruby-nos-aliados/</link>
		<comments>http://reinventar.com/2009/05/ruby-nos-aliados/#comments</comments>
		<pubDate>Tue, 19 May 2009 14:40:15 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=586</guid>
		<description><![CDATA[On this weekend I went to Porto to participate on the Ruby @ Aliados event. The goal was to bring the Ruby comunity together to network, trade advices, present projects and share knowledge. The event was brought together in a very Barcamp-like style, informal but valuable, I guess. There&#8217;s some key points to be improved [...]]]></description>
			<content:encoded><![CDATA[<p>On this weekend I went to Porto to participate on the Ruby @ Aliados event. The goal was to bring the Ruby comunity together to network, trade advices, present projects and share knowledge.</p>
<p>The event was brought together in a very Barcamp-like style, informal but valuable, I guess. There&#8217;s some key points to be improved for next time but I think a very valuable step was put forward to atempt to bring people on the comunity together.</p>
<p>There was presentations on BDD, Cucumber, Performance on Rails (<a href="http://www.slideshare.net/psousa/performance-on-rails-barcamp-pt-08-presentation">by me</a>), Capistrano, lot&#8217;s of discussion on topics like IDE&#8217;s, deployment, testing and some interesting projects were also presented (like <a href="http://www.escolinhas.pt">escolinhas.pt</a>).</p>
<p>Looking forward for next time. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/05/ruby-nos-aliados/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 CMS solutions for Ruby on Rails</title>
		<link>http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/</link>
		<comments>http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 07 May 2009 18:37:30 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=572</guid>
		<description><![CDATA[If you&#8217;re looking for a CMS built in Ruby on Rails, here&#8217;s 3 solutions you might enjoy (in no particular order): Adva-CMS Adva-cms is an open source cms plattform based on Ruby on Rails and Rails Engines. Radiant CMS Radiant is a no-fluff, open source content management system designed for small teams. Browser CMS Browser [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for a CMS built in Ruby on Rails, here&#8217;s 3 solutions you might enjoy (in no particular order):</p>
<p><a title="Advacms" href="http://adva-cms.org/" target="_blank">Adva-CMS</a></p>
<p>Adva-cms is an open source cms plattform based on Ruby on Rails and Rails Engines.</p>
<p><a title="radiantcms" href="http://www.radiantcms.org/" target="_blank">Radiant CMS</a></p>
<p>Radiant is a no-fluff, open source content management system designed for small teams.</p>
<p><a title="browsercms" href="http://www.browsercms.org/" target="_blank">Browser CMS</a></p>
<p>Browser CMS is a new-comer on the Rails community but promise to stir things up. Take a look at their <a title="brows" href="http://aac2009.confreaks.com/07-feb-2009-10-00-browsercms-patrick-peak-and-paul-barry.html" target="_blank">video presentation</a>.</p>
<p>And here&#8217;s 3 screenshots of each CMS in action:</p>

<a href='http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/advacms/' title='advacms'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/05/advacms-150x150.png" class="attachment-thumbnail" alt="advacms" title="advacms" /></a>
<a href='http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/browsercms/' title='browsercms'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/05/browsercms-150x150.png" class="attachment-thumbnail" alt="browsercms" title="browsercms" /></a>
<a href='http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/radiant/' title='radiant'><img width="150" height="150" src="http://reinventar.com/wp-content/uploads/2009/05/radiant-150x150.png" class="attachment-thumbnail" alt="radiant" title="radiant" /></a>

]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/05/3-cms-solutions-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Upload files using Paperclip on Ruby on Rails</title>
		<link>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/</link>
		<comments>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:25:15 +0000</pubDate>
		<dc:creator>psousa</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://reinventar.com/?p=543</guid>
		<description><![CDATA[Paperclip is an awesome plugin to handle file uploads in Ruby on Rails. I&#8217;ve been using in a couple of projects lately and I thought I&#8217;d talk a bit about it. First of all, you need to install the plugin on your project by doing: script/plugin install git://github.com/thoughtbot/paperclip.git from your project main directory. After this, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thoughtbot.com/projects/paperclip">Paperclip</a> is an awesome plugin to handle file uploads in Ruby on Rails. I&#8217;ve been using in a couple of projects lately and I thought I&#8217;d talk a bit about it.</p>
<p>First of all, you need to install the plugin on your project by doing:</p>
<pre><code>script/plugin install git://github.com/thoughtbot/paperclip.git</code></pre>
<p>from your project main directory. After this, usage is very simple.</p>
<p>Let&#8217;s imagine I have a user model and I want to have a avatar attribute to include a picture of the user and let&#8217;s say we want that avatar to be resized to 3 different sizes (120&#215;120, 48&#215;48 and 26&#215;26). Paperclip does this using ImageMagick.</p>
<p>We&#8217;re first going to create a migration to hold all this information:</p>
<pre><code>class AddAttachmentsAvatarToUser &lt; ActiveRecord::Migration
  def self.up
    add_column :users, :avatar_file_name, :string
    add_column :users, :avatar_content_type, :string
    add_column :users, :avatar_file_size, :integer
    add_column :users, :avatar_updated_at, :datetime
  end

  def self.down
    remove_column :users, :avatar_updated_at
    remove_column :users, :avatar_file_name
    remove_column :users, :avatar_content_type
    remove_column :users, :avatar_file_size
  end
end</code></pre>
<p>Then we define the attribute in the model:</p>
<pre><code>
class User &lt; ActiveRecord::Base
has_attached_file :avatar, :styles =&gt; { :large =&gt; "120x120&gt;", :medium =&gt; "48x48&gt;", :thumb =&gt; "26x26&gt;" }
end
</code></pre>
<p>Here&#8217;s an example on how your form should be:</p>
<pre><code>&lt;% form_for :user, @user, :url =&gt; user_path, :html =&gt; { :multipart =&gt; true } do |form| %&gt;
    &lt;%= form.file_field :avatar %&gt;
  &lt;% end %&gt;</code></pre>
<p>Your controller doesn&#8217;t have to do anything specific to handle the avatar, just save the user as usual.</p>
<pre><code>  def create
    @user = User.create( params[:user] )
  end</code></pre>
<p>And finally, if you want to show the avatar in your view, here&#8217;s some examples:</p>
<pre><code>  &lt;%= image_tag @user.avatar.url %&gt;
  &lt;%= image_tag @user.avatar.url(:medium) %&gt;
  &lt;%= image_tag @user.avatar.url(:thumb) %&gt;</code></pre>
<p>That wasn&#8217;t very difficult. There&#8217;s some advance stuff you can do with <a href="http://thoughtbot.com/projects/paperclip">Paperclip</a>, like<a href="http://almosteffortless.com/2008/12/11/easy-upload-via-url-with-paperclip/"> upload via a URL</a> or upload your files to Amazon&#8217;s S3 or define post processing operations on your files.</p>
<p>So get creative and use it in your projects. :)</p>
<p>Update:<a href="http://thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip"> The WebFellas</a> have a very deep and interesting article about Paperclip, <a href="http://thewebfellas.com/blog/2008/11/2/goodbye-attachment_fu-hello-paperclip">check it out</a>.</p>
<p><a href="http://bookworms.sapo.pt"><img class="alignleft size-full wp-image-544" title="picture-52" src="http://reinventar.com/wp-content/uploads/2009/03/picture-52.png" alt="picture-52" width="468" height="320" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://reinventar.com/2009/03/upload-files-with-paperclip-on-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
