<?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>ActivoRicordi Captain&#039;s log &#187; RubyonRails</title>
	<atom:link href="http://blog.activoricordi.com/category/rubyonrails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.activoricordi.com</link>
	<description>Delivering Innovation through Technology</description>
	<lastBuildDate>Sat, 21 Jan 2012 00:56:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Learn to build a Rails app using Heroku and Git</title>
		<link>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/</link>
		<comments>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 13:34:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=7</guid>
		<description><![CDATA[Hi All: I have recently discover Heroku service for building applications. It is extremely useful and extremely easy to use. It is also based in Git a SCM system which is also revolutionazing the version control systems. To install Git, we could use this guide located on the progit or also you can see this [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All:</p>
<p>I have recently discover Heroku service for building applications. It is extremely useful and extremely easy to use. It is also based in Git a SCM system which is also revolutionazing the version control systems.</p>
<p>To install Git, we could use this guide located on the progit or also you can see this <a href="http://www.nice-panorama.com/Programmation/cappuccino/Tutorial-git.html">page</a> which explains how to use textmate with git</p>
<p>We set git configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>$<span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span> git config <span style="color:#006600; font-weight:bold;">--</span>global user.<span style="color:#9900CC;">name</span> <span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#996600;">&quot;Your Name&quot;</span><span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;</span>span<span style="color:#006600; font-weight:bold;">&gt;</span>$<span style="color:#006600; font-weight:bold;">&lt;/</span>span<span style="color:#006600; font-weight:bold;">&gt;</span> git config <span style="color:#006600; font-weight:bold;">--</span>global user.<span style="color:#9900CC;">email</span> youremail@example.<span style="color:#9900CC;">com</span></pre></div></div>

<p>There is a great Quickstart for using Heroku which I used as a base for this post: http://docs.heroku.com/quickstart</p>
<ul>
<li>Sign in in Heroku</li>
<li>Install Heroku gem:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ sudo gem install heroku</pre></div></div>

<ul>
<li>Create the local application in your mac: rails myapp</li>
<li>Access to the rails app: cd myapp</li>
<li>Install git</li>
<li>Execute git:  <em>$ git init</em></li>
<li>Do git add:  <em>$ git add .</em></li>
<li>We access to the following command:</li>
</ul>
<ul>
<li>
<ul>
<li>Do git first commit: <code><em>$ git commit -m "new app"</em><br />
</code></li>
<li>We open the application, and we start the local server <em>ruby script/server </em>and access to localserver using <em>http://127.0.0.1:3000</em></li>
<li>As usual, we generate a index or home controller. I generally call them <strong><em>dashboard</em></strong> as it is sexy: <em>$ ruby script/generate controller dashboard index</em></li>
<li>We delete the entry page: <em><span>$ rm public/index.html</span></em></li>
<li>We modify the <span style="font-weight: bold;">config/routes.rb </span>to enter the following route map:</li>
</ul>
<ul></ul>
<ul>
<li>We create the heroku application directly on the heroku site from our computer merely using the Heroku&#8217;s gem</li>
</ul>
<ul>
<li>Now the web site will be visible on the following address: http://severe-stone-45.heroku.com. Sustitute the name by the name provided by Heroku and you got it. As the heroku repository is blank when we create the application we need to deploy the code to a specific branch, we deploy the code throuh this instruction</li>
</ul>
</li>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">$ rake db:create
db<span style="color:#006600; font-weight:bold;">/</span>development.<span style="color:#9900CC;">sqlite3</span> already exists</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">map.<span style="color:#9900CC;">connect</span> <span style="color:#996600;">':controller/:action/:id'</span>
map.<span style="color:#9900CC;">connect</span> <span style="color:#996600;">':controller/:action/:id.:format'</span>
<span style="color:#008000; font-style:italic;"># Enter the route to access to enter the dashboard</span>
 map.<span style="color:#9900CC;">root</span> <span style="color:#ff3333; font-weight:bold;">:controller</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">&quot;dashboard&quot;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">rake db:migrate</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">heroku create
Created http:<span style="color:#006600; font-weight:bold;">//</span>severe<span style="color:#006600; font-weight:bold;">-</span>stone<span style="color:#006600; font-weight:bold;">-</span>45.<span style="color:#9900CC;">heroku</span>.<span style="color:#9900CC;">com</span><span style="color:#006600; font-weight:bold;">/</span> <span style="color:#006600; font-weight:bold;">|</span> git@heroku.<span style="color:#9900CC;">com</span>:severe<span style="color:#006600; font-weight:bold;">-</span>stone<span style="color:#006600; font-weight:bold;">-</span>45.<span style="color:#9900CC;">git</span></pre></div></div>

<p>$ git push heroku master</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/11/learn-to-build-a-rails-app-using-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I have changed to JQuery in Rails</title>
		<link>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/</link>
		<comments>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 09:23:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails 2.0]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/</guid>
		<description><![CDATA[jQuery is today the best js library, prototype is a challenger.The reasons why I think this are beautifully illustrated on the following post. To use jQuery in rails install the following plugin: ruby script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails Here is a list of existing functions which are available once we replace prototype+scriptacuolous for the jquery. Hopefully, this [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery is today the best js library, prototype is a challenger.The reasons why I think this are beautifully illustrated on the following <a href="http://jimneath.org/2008/06/18/using-jquery-with-ruby-on-rails/">post</a>. To use jQuery in rails install the following plugin:</p>
<p>ruby script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails</p>
<p>Here is a <a href="http://justtalkaboutweb.com/2008/01/14/replace-prototype-with-jquery-on-rails/">list</a> of existing functions which are available once we replace prototype+scriptacuolous for the jquery. Hopefully, this support will improve once we approach to Rails 3.</p>
<p>If you want to use both libraries, you will keep prototype js files, if you plan to use only jquery you could removed them. I particularly think that seems you have decided to use jquery there is few reasons to keep them.</p>
<p>Also, there are two ways to use jquery, I just found this interesting article which speak about a different way to use jquery, not using jrails but instead in a more unobstrusive way. Interesting point of view.</p>
<p>http://www.notgeeklycorrect.com/english/2009/05/18/beginners-guide-to-jquery-ruby-on-rails/</p>
<p>Kind regards and good weekend</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2009/11/i-have-changed-to-jquery-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conferencia Rails 2008</title>
		<link>http://blog.activoricordi.com/2008/11/conferencia-rails-2008/</link>
		<comments>http://blog.activoricordi.com/2008/11/conferencia-rails-2008/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 17:42:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[conferenciarails2008]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=110</guid>
		<description><![CDATA[Un más ActivoRicordi ha estado en la conferencia Rails española. Un año más esta siendo una gran experiencia, un año más el software es la excusa para juntar gente brillante sobre un mismo techo y compartir que se esta haciendo cosas muy interesantes en este país relativos a la innovación. Muy lentamente se esta generando [...]]]></description>
			<content:encoded><![CDATA[<p>Un más ActivoRicordi ha estado en la conferencia Rails española. Un año más esta siendo una gran experiencia, un año más el software es la excusa para juntar gente brillante sobre un mismo techo y compartir que se esta haciendo cosas muy interesantes en este país relativos a la innovación.</p>
<p>Muy lentamente se esta generando un tejido empresarial de innovación y productividad a través de la technologia &#8220;Ruby on Rails&#8221; y a su alreador. Una technologia que es la excusa para lanzar iniciativas con muchos puntos comunes</p>
<p><strong>Colaboración y comunidad</strong>: Las aplicaciones son esfuerzos colaborativos de un grupo de personas buscando situaciones win-win.</p>
<p><strong>Usabilidad</strong> : Simplicidad de uso en las interfases, flexibilidad o más bien adaptación a los usuarios.</p>
<p><strong>Productividad</strong>: Crear desarrollo productivos, competir con inversiones pequeñas con los jugadores más grandes</p>
<p><strong>Software como servicio o con servicios añadidos</strong>: El software se convierte en algo más que una licencia, es la excusa para proporcionar un servicio al usuario, flexible, agil y adaptado a sus necesidades.</p>
<p><strong>Estandarización</strong>: Enlazado con la colaboración, utilización de estandares.</p>
<p><strong>Escalabilidad</strong>: La infrastructura no debe convertirse en una limitación a las ideas y a los proyectos.</p>
<p>Sin embargo, considero que este será uno de los años claves para Framework, por un lado empiezan a aparecer competidores en el mercado como Merb que ganan adeptos, y por otro la crisis obliga a muchos proyectos a darse una dosis de realidad.</p>
<p>Aunque existen casos de exitos muy interesantes, me ha sorprendido mucho saber que &#8220;La Razon&#8221; corre sobre Rails, y si sigue a este ritmo &#8220;La Coctelera&#8221; pronto será conocida como &#8220;La Incubadora&#8221; : UVLog, iwannagothere.com , estos tipos no paran de crear propuestas nuevas.</p>
<p>Cierro aquí para asistir a la Keynote de &#8220;Obie Fernandez&#8221;.</p>
<p>Hasta el proximo año!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/11/conferencia-rails-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorials in Routing in Rails 2.0</title>
		<link>http://blog.activoricordi.com/2008/08/tutorials-in-routing-in-rails-20/</link>
		<comments>http://blog.activoricordi.com/2008/08/tutorials-in-routing-in-rails-20/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 02:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Routes.rb]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=70</guid>
		<description><![CDATA[Hi All: I try to be fresh and publish new material, but sometimes when someone do something with excellence we only need to praise his work. Here a set of nice articles for explaining what it is routing in Rails from Daryn Holmes. !!Excellent Work!! Part 1 Beginners Tutorial: Routing in Rails 2.0 (with REST) [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All:</p>
<p>I try to be fresh and publish new material, but sometimes when someone do something with excellence we only need to praise his work.</p>
<p>Here a set of nice articles for explaining what it is routing in Rails from <a class="wp-caption" title="Daryn Holmes Blog" href="http://darynholmes.wordpress.com" target="_blank">Daryn Holmes</a>. !!Excellent Work!!</p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="http://darynholmes.wordpress.com/2008/03/15/beginners-tutorial-routing-in-rails-20-with-rest-part-1-of-n/" target="_blank">Part 1 </a><a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 1 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/03/15/beginners-tutorial-routing-in-rails-20-with-rest-part-1-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 1 of n</a></p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="http://darynholmes.wordpress.com/2008/03/25/beginners-tutorial-routing-in-rails-20-with-rest-part-2-of-n/" target="_blank">Part 2 </a><a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 2 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/03/25/beginners-tutorial-routing-in-rails-20-with-rest-part-2-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 2 of n</a></p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="http://darynholmes.wordpress.com/2008/04/27/beginners-tutorial-routing-in-rails-20-with-rest-part-3-of-n/" target="_blank">Part 3 </a><a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 3 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/04/27/beginners-tutorial-routing-in-rails-20-with-rest-part-3-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 3 of n</a></p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="http://darynholmes.wordpress.com/2008/05/11/beginners-tutorial-routing-in-rails-20-with-rest-part-4-of-n/" target="_blank">Part 4</a> <a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 4 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/05/11/beginners-tutorial-routing-in-rails-20-with-rest-part-4-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 4 of n</a></p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="http://darynholmes.wordpress.com/2008/05/26/beginners-tutorial-routing-in-rails-20-with-rest-part-5-of-n/" target="_blank">Part 5</a> <a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 5 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/05/26/beginners-tutorial-routing-in-rails-20-with-rest-part-5-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 5 of n</a></p>
<p><a class="wp-caption" title="Beginners tutorial routing in Rails 2.0 with rest" href="Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 6 of n" target="_blank">Part 6</a> <a title="Permanent Link: Beginners Tutorial: Routing in Rails 2.0 (with REST) - Part 6 of n" rel="bookmark" href="http://darynholmes.wordpress.com/2008/07/06/beginners-tutorial-routing-in-rails-20-with-rest-part-6-of-n/">Beginners Tutorial: Routing in Rails 2.0 (with REST) &#8211; Part 6 of n</a></p>
<p>Kind regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/08/tutorials-in-routing-in-rails-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create an AddressBook 1</title>
		<link>http://blog.activoricordi.com/2008/08/create-an-addressbook-1/</link>
		<comments>http://blog.activoricordi.com/2008/08/create-an-addressbook-1/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 23:59:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mashups]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[address book]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=6</guid>
		<description><![CDATA[Most of the articles and projects about Ruby on Rails do not cover the whole process of creating an open source slim project, the objective of these set of posts if cover the whole development process]]></description>
			<content:encoded><![CDATA[<p>Hi All:</p>
<p>One of the things I dislike most of Open Source Applications, it is that are very difficult to continue since the code and way it is built, also it does not cover components; instead of building new entire application I would like to see how to build small reusable components which could be integrated on new applications. Today, we are going to explain how to create a slik &#8220;address book&#8221;.</p>
<p><strong>1) Create the rails project:</strong></p>
<p>As I am a fan of mysql database, I do create projects specifically for this database with the sentence:</p>
<p><code>rails -d mysql addressbook</code></p>
<p><strong>2) Create main objects:</strong></p>
<p>The base of the addressbook is the contact object which we are going to scaffold:</p>
<p><code>script/generate scaffold contact firstname:string lastname:string lastname2:string phone_id:integer address_id:integer photo_id:integer page_url:string title:string company_id:integer email_id:integer background:text comments:text author:string</code></p>
<p>As you can see the Contact is compound by other objects such as phone, address and photo. These objects are formed by several characteristics:</p>
<ul>
<li>firstname</li>
<li>lastname</li>
<li>lastname2 &#8211; For those countries where a second last name is used</li>
<li>phone_id &#8211; Each contact can have multiple phone which forms an array of values</li>
<li>address_id- The address could be multiple and build on an object with an array of values</li>
<li>comments &#8211; It has an auto-complete feature</li>
</ul>
<p>3) Create authentication:</p>
<p>We are going to create the authentication, so only authorized users can access to the application</p>
<p>script/generate scaffold user userName:string firstName:string lastName:string alias:string email:string password_salt:string password_hash:string</p>
<p>4) Setup the database:</p>
<p>We open the database.yml file where we insert the password of the root user or if we have leave it blank as default we do not have to enter it. In order to look it, install a mysql administration tool. There are plenty on the Internet.</p>
<p>We execute the rake command to create the database</p>
<p><code>rake create:db:all</code></p>
<p>And we create the first migration</p>
<p><code>rake migrate:db</code></p>
<p>Now we have created the contact object on the database.</p>
<p>On next chapter, we will create the rest of the subornidates objects and we will add plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/08/create-an-addressbook-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacOS X Ruby on Rails Development tips I</title>
		<link>http://blog.activoricordi.com/2008/08/macos-x-ruby-on-rails-development-tips-i/</link>
		<comments>http://blog.activoricordi.com/2008/08/macos-x-ruby-on-rails-development-tips-i/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 10:49:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[Rails 2.0]]></category>
		<category><![CDATA[rails tips]]></category>
		<category><![CDATA[scaffold]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=15</guid>
		<description><![CDATA[We open a set of posts dedicated to mentioned Rails development tips or tricks which are often found in several articles: 1) Open several instances of a webrick server from the command line on MacOs X Leopard : This article is based on a similar tip provided for Windows OS by Mr. Arjun Ghosh. It [...]]]></description>
			<content:encoded><![CDATA[<p>We open a set of posts dedicated to mentioned Rails development tips or tricks which are often found in several articles:</p>
<p>1) <strong>Open several instances of a webrick server from the command line on MacOs X Leopard :</strong><br />
This article is based on a similar tip provided for <a href="http://arjunghosh.wordpress.com/2007/09/06/starting-multiple-instances-of-webrick-server-from-the-command-line/">Windows OS</a> by Mr. Arjun Ghosh. It is basically the same.<br />
a) I open my Terminal app<br />
b) I access to my rails application directory (previously created) which is created on my Library directory:<br />
<code>cd library/rails_apps</code><br />
c) Then, we access to each one of the applications we want to open in webrick: We open the first server with the typical sentence:<br />
<code>/script/server</code><br />
and then if we want to open another application, we access to the application:<br />
<code>cd<br />
/script/server -p3001</code></p>
<p>2) Scaffold Rails 2.0</p>
<p>Clearly, I do not understand this scaffold change on the Rails 2.0 version, it has changed one of the features I enjoyed most from Rails which was a great dynamic scaffolding, and also the possibility to scaffold a model and a specific controller. I understand that it is being done to obtain a more Restful approach on the models and on the controllers, but sometimes is a pain.</p>
<p>Not long time before the appearing of Rails 2.0, I had the brilliant idea of buying last version of version of the Rails book which obviously have all example written in Rails 1.x version. For that reason depot example is no longer valid.</p>
<p>As Mr. Arjun Ghosh mentioned on his comment before there is a new edition of &#8220;Agile Web Development with Rails&#8221; coming out soon. (<a class="wp-caption-dd" title="AWDR Third Edition" href="http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition" target="_blank">See reference</a>)</p>
<p>Enough for now<br />
Regards</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2008/08/macos-x-ruby-on-rails-development-tips-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Aplicación para administración de fincas</title>
		<link>http://blog.activoricordi.com/2007/12/aplicacion-para-administracion-de-fincas/</link>
		<comments>http://blog.activoricordi.com/2007/12/aplicacion-para-administracion-de-fincas/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 02:19:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[administradores de fincas]]></category>
		<category><![CDATA[comunidades]]></category>
		<category><![CDATA[Español]]></category>
		<category><![CDATA[fincas]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=8</guid>
		<description><![CDATA[He encontrado por casualidad una aplicación web para administradores de fincas y comunidades que se llama eFinca 2.0. Se trata de un proyecto o un negocio realizado por dos programadores de Ruby on Rails. Uno de ellos Vicent Gozalbes tiene un blog bastante interesante con un montón de recursos sobre Ruby on Rails. Feliz Año [...]]]></description>
			<content:encoded><![CDATA[<p>He encontrado por casualidad una aplicación web para administradores de fincas y comunidades que se llama <a href="http://www.efinca.com/">eFinca 2.0</a>. Se trata de un proyecto o un negocio realizado por dos programadores de Ruby on Rails.</p>
<p>Uno de ellos <a href="http://www.vicentgozalbes.com/">Vicent Gozalbes</a> tiene un blog bastante interesante con un montón de recursos sobre Ruby on Rails.</p>
<p>Feliz Año 2008 a todos</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2007/12/aplicacion-para-administracion-de-fincas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gestión de autorizaciones y autentificaciones en RoR 2</title>
		<link>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror-2/</link>
		<comments>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror-2/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 19:57:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=4</guid>
		<description><![CDATA[2. Una vez creados asignaremos las rutas restful dentro de la carpeta config/routes.rb Abrimos el fichero config/routes.rb, y introducimos las siguientes entradas: map.resources :usersmap.resource :account Para mapear los controladores vamos a utilizar las siguientes URLs para mapear la autentificación: map.signup '/signup', :controller =&#62; 'users', :action =&#62; 'new' map.login '/login', :controller =&#62; 'account', :action =&#62; 'new' [...]]]></description>
			<content:encoded><![CDATA[<p>2. Una vez creados asignaremos las rutas restful dentro de la carpeta config/routes.rb<br />
Abrimos el fichero config/routes.rb, y introducimos las siguientes entradas:</p>
<pre><code>map.resources :users</code>map.resource  :account</pre>
<p>Para mapear los controladores vamos a utilizar las siguientes URLs para mapear la autentificación:</p>
<pre><code>

map.signup '/signup', :controller =&gt; 'users', :action =&gt; 'new'</code></pre>
<pre><code></code>map.login  '/login', :controller =&gt; 'account', :action =&gt; 'new'

map.logout '/logout', :controller =&gt; 'account', :action =&gt; 'destroy'</pre>
<p>3. Permitir a los propios usuarios mantener sus detalles una vez registrados, tenemos que incluir el siguiente código al controlador que gestiona como hemos visto la autentificación de los usuarios.</p>
<p class="MsoNormal">En el caso de que hayamos creado un controlador denominado “account” y un modelo denominado como “user”, abriremos el fichero “account_controller.rb” dentro de nuestra carpeta de “app/controller” . Abrimos el fichero &#8216;<em>&lt;nombrecontrolador_controller.rb</em>&#8216; y le añadimos el siguiente código:</p>
<pre><code>## Edit User</code>## allow a user to edit their detailsdef edit

@user = User.find(self.current_user.id)

end

<code></code>

##update the user table

def update

@user = User.find(self.current_user.id)

if @user.update_attributes(params[:user])

flash[:notice] = 'User was successfully updated.'

redirect_to :action =&gt; 'index'

else

render :action =&gt; 'edit'

end

end

end</pre>
<p>Una vez añadido este código al controlador vamos a crear las siguientes vistas, dentro del controlador &#8216;user&#8217;:</p>
<p class="MsoNormal"><span lang="EN-US"><em>_userForm.rhtml</em></span></p>
<pre><code>&lt;%= error_messages_for 'user' %&gt;</code>&lt;!--[form:user]--&gt;&lt;!-- all custom fields here --&gt;

&lt;p&gt;&lt;label for="user_email"&gt;Email Address&lt;/label&gt;&lt;br/&gt;

&lt;%= text_field 'user', 'email'  %&gt;&lt;/p&gt;

&lt;!--[eoform:user]--&gt;</pre>
<p class="MsoNormal">Y luego creamos otro recurso más denominado  &#8216;edit.rhmtl&#8217;</p>
<pre><code>&lt;p&gt;Edit your details&lt;/p&gt;</code>&lt;%= start_form_tag :action =&gt; 'update' %&gt;&lt;%= render :partial =&gt; 'userForm' %&gt;

&lt;%= submit_tag 'Edit' %&gt;

&lt;%= end_form_tag %&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gestión de autorizaciones y autentificaciones en RoR</title>
		<link>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror/</link>
		<comments>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 18:46:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.activoricordi.com/?p=3</guid>
		<description><![CDATA[Una de las mejores cosas que tiene &#8220;Rails&#8221; es lo sencillo que es gestionar todas las autorizaciones y la autentificación de los usuarios además de la razonable cantidad de &#8220;plugins&#8221; ya escritos. En cierta manera, aunque pueda parecer muy restrictivo sería genial que estuviese contenido ya dentro del mismo &#8220;framework&#8221; como un gestor de usuarios, [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Una de las mejores cosas que tiene &#8220;<em>Rails</em>&#8221; es lo sencillo que es gestionar todas las autorizaciones y la autentificación de los usuarios además de la razonable cantidad de &#8220;<em>plugins</em>&#8221; ya escritos. En cierta manera, aunque pueda parecer muy restrictivo sería genial que estuviese contenido ya dentro del mismo &#8220;<em>framework</em>&#8221; como un gestor de usuarios, roles y grupos.</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">De cualquier manera existe ya un plugin denominado RESTful Authenticated (versión nueva del Act_as_Authenticated) que nos ahorra mucho trabajo y que fácilmente podemos adaptar para administrar el resto del sistema de autorizaciones y autenticación.</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">1.Obviamente lo primero que hemos de hacer será instalar el plugin &#8220;RESTful authentication&#8221; en nuestra aplicación, se trata de un paso sencillo.</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">2.- Autentificación del Usuario:</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">&#8220;<em>RESTful authentication</em>&#8221; es un generador que nos va permitir crear el modelo y el controlador que va a realizar la gestión de la autentificación del usuario.</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 10pt; font-family: 'Courier New';">ruby script/generate authenticated user account</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">rake db:migrate</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
Si estamos utilizando RadRails, iremos a la pestaña de Generators una vez bajado e instalado el plugin, y introduciremos &#8220;<em>authenticated</em>&#8221; dem<br />
&#8216;user&#8217; es el nombre del modelo que vamos a utilizar para guardar los datos de autentificación del usuario, además creamos el nombre del controlador que va a gestionar la autentificación en este caso vamos a llamarlo &#8216;account&#8217;, pero podemos llamarlo &#8216;cuenta&#8217;,'acceso&#8217; o el nombre que le queramos dar.</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 10pt; font-family: 'Courier New';">./script/generate authenticated <em>&lt;usermodelname&gt;</em> <em>&lt;controllername&gt;</em></span></p>
<pre>./script/generate authenticated user sessions</pre>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Esto no creara un modelo &#8216;user&#8217; o &#8216;usuario&#8217; y un controlador que se denominara &#8216;account&#8217; en que luego entraremos a para adaptarlo a nuestro intereses</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 10pt; font-family: 'Courier New';">./script/generate authenticated user account \&#8211;include-activation</span></p>
<p class="MsoNormal" style="line-height: normal"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Mediante el generador se crearan automáticamente los siguientes recursos:</span></p>
<p class="MsoNormalCxSpMiddle" style="line-height: normal"><span style="font-size: 10pt; font-family: 'Courier New';">exists app/models/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists app/controllers/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists app/controllers/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists app/helpers/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create app/views/account</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists app/controllers/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists app/helpers/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create app/views/users</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists test/functional/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists test/functional/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">exists test/unit/</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create app/models/user.rb</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> -<br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create app/controllers/account_controller.rb</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create app/controllers/users_controller.rb</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create lib/authenticated_system.rb</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create lib/authenticated_test_helper.rb</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"><br />
</span><span style="font-size: 10pt; font-family: 'Courier New';">create test/functional/account_controller_test.rb<br />
create app/views/users/new.rhtml<br />
create test/functional/users_controller_test.rb<br />
create test/unit/user_test.rb<br />
create test/fixtures/users.yml<br />
create app/helpers/account_helper.rb<br />
create app/helpers/users_helper.rb<br />
create app/views/account/new.rhtml</span></p>
<p class="MsoNormalCxSpMiddle" style="line-height: normal">Si se utiliza el textmate existe un bundle especifico dentro del textmate que permite la instalación de plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.activoricordi.com/2007/12/gestion-de-autorizaciones-y-autentificaciones-en-ror/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

