<?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>Sentia &#124; Sydney IT Consultancy, Software Development, Ruby on Rails, Web Application Development, Rails Development, Test Driven Development, Microsoft.Net, Asp.Net , Agile, Continuous Integration Training, iPhone development</title>
	<atom:link href="http://sentia.com.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://sentia.com.au</link>
	<description>Sentia company website and blog about all things development, Ruby on Rails, Microsoft .Net, ASP.Net, C#.Net, Agile web development, Test Driven Development</description>
	<lastBuildDate>Wed, 10 Mar 2010 23:41:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why are you still on IE7 i ask you???</title>
		<link>http://sentia.com.au/2010/03/why-are-you-still-on-ie7-i-ask-you/</link>
		<comments>http://sentia.com.au/2010/03/why-are-you-still-on-ie7-i-ask-you/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 23:41:24 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=668</guid>
		<description><![CDATA[It still amazes me that users are on older versions of their browsers when upgrades are not only free but they also say &#8220;Hey l am old there is a new model out there go and get it&#8221;.
The problem with web development is support for browser versions. It takes time which costs money. Now you [...]]]></description>
			<content:encoded><![CDATA[<p>It still amazes me that users are on older versions of their browsers when upgrades are not only free but they also say &#8220;Hey l am old there is a new model out there go and get it&#8221;.</p>
<p>The problem with web development is support for browser versions. It takes time which costs money. Now you can normally cover most of your bases by developing for FireFox. If you do there is a good chance it will work in safari and chrome as well, IE on the other hand is another issue.</p>
<p>Ill emit that IE8 is a huge step up but its still not perfect. Web apps should only support the latest version of browsers. I say we stop supporting old versions and make those users get with the times!!! Come on who is with me</p>
<p>For info on browser usage <a href="http://www.w3schools.com/browsers/browsers_stats.asp">check this out</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2010/03/why-are-you-still-on-ie7-i-ask-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Because l still forget how to do copyright and trademark symbols in HTML</title>
		<link>http://sentia.com.au/2010/02/because-l-still-forget-how-to-do-copyright-and-trademark-symbols-in-html/</link>
		<comments>http://sentia.com.au/2010/02/because-l-still-forget-how-to-do-copyright-and-trademark-symbols-in-html/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 23:05:25 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[html tags]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=657</guid>
		<description><![CDATA[Not matter how many times l do it l still never remember how to to the Copyright and Trademark symbols in HTML code so here they are
&#169; can be created with this:

&#38;copy;

&#174; can be created with this:

&#38;reg;

&#8482; can be created with this:

&#38;trade;

]]></description>
			<content:encoded><![CDATA[<p>Not matter how many times l do it l still never remember how to to the Copyright and Trademark symbols in HTML code so here they are</p>
<p>&copy; can be created with this:</p>
<pre class="brush: xml;">
&amp;copy;
</pre>
<p>&reg; can be created with this:</p>
<pre class="brush: xml;">
&amp;reg;
</pre>
<p>&trade; can be created with this:</p>
<pre class="brush: xml;">
&amp;trade;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2010/02/because-l-still-forget-how-to-do-copyright-and-trademark-symbols-in-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2x Rails Mid / Senior level Developer Sydney</title>
		<link>http://sentia.com.au/2010/02/rails-junior-mid-level-developer-sydney/</link>
		<comments>http://sentia.com.au/2010/02/rails-junior-mid-level-developer-sydney/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 02:09:03 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[sentia]]></category>
		<category><![CDATA[rails developer sydney]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=651</guid>
		<description><![CDATA[
Sentia is looking for a 2 x Junior / Mid level Rails developer to join our team. Min 12month contract or perm available with good rates dependent on experience. 
You will be working out of our office on George Street in the heart of the Sydney CBD. You will have access to the latest technology [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sentia.com.au/wp-content/uploads/2009/04/hiring.gif" alt="hiring 2x Rails Mid / Senior level Developer Sydney" title="hiring" width="77" height="56" /></p>
<p>Sentia is looking for a 2 x Junior / Mid level Rails developer to join our team. Min 12month contract or perm available with good rates dependent on experience. </p>
<p>You will be working out of our office on George Street in the heart of the Sydney CBD. You will have access to the latest technology and resources not to mention our foos ball table.</p>
<p>You will be working on a long term project for the Music industry with some fantastic technology and people.</p>
<p>You will need to have the following skills and experience.</p>
<ul>
<li> A passion for development</li>
<li> 12+ months  experience in rails</li>
<li> TDD experience</li>
<li> Git</li>
<li> Good HTML/CSS skills</li>
<li> Javascript</li>
<li> Good communication skills</li>
<li> Keen to learn with a great attitude</li>
<li> iPhone development skills a plus</li>
</ul>
<p>Experience with agile methodologies and design skills a bonus. </p>
<p>So if you think you have what it takes email us at <a href="mailto:jobs@sentia.com.au">jobs@sentia.com.au</></p>
<p><strong>No recruiters</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2010/02/rails-junior-mid-level-developer-sydney/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The problems with classic styles of Project Management</title>
		<link>http://sentia.com.au/2010/02/the-problems-with-classic-styles-of-project-management/</link>
		<comments>http://sentia.com.au/2010/02/the-problems-with-classic-styles-of-project-management/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 23:01:03 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[project management]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=641</guid>
		<description><![CDATA[The constant battle l have faced in this game is dealing with old styles of project management still being used today. Some clients and businesses just don&#8217;t understand that its not in their best interest to work like this.
I came across a very smart story explaining why this is not the way to go and [...]]]></description>
			<content:encoded><![CDATA[<p>The constant battle l have faced in this game is dealing with old styles of project management still being used today. Some clients and businesses just don&#8217;t understand that its not in their best interest to work like this.</p>
<p>I came across a very smart story explaining why this is not the way to go and l think it explains it best.</p>
<p><img src="http://sentia.com.au/wp-content/uploads/2010/02/ProjectManagementSummary.jpg" alt="ProjectManagementSummary The problems with classic styles of Project Management" title="ProjectManagementSummary" width="550" height="350" class="alignnone size-full wp-image-640" /></p>
<p>Courtesy of http://www.ssw.com.au</p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2010/02/the-problems-with-classic-styles-of-project-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Traditional “Fixed Bid” Software Projects Usually Fail</title>
		<link>http://sentia.com.au/2009/12/why-traditional-%e2%80%9cfixed-bid%e2%80%9d-software-projects-usually-fail/</link>
		<comments>http://sentia.com.au/2009/12/why-traditional-%e2%80%9cfixed-bid%e2%80%9d-software-projects-usually-fail/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 02:42:19 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[client projects]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[contracts]]></category>
		<category><![CDATA[fixed price]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=620</guid>
		<description><![CDATA[Just found a great article on why fixed price projects fail. Paul Dittmann has writing a great article on it which you can find here
It&#8217;s a worth while read that is a must for all companies tendering for projects and all companies looking for developers
]]></description>
			<content:encoded><![CDATA[<p>Just found a great article on why fixed price projects fail. Paul Dittmann has writing a great article on it which you can find <a href="http://www.pathf.com/blogs/2009/12/4451/">here</a></p>
<p>It&#8217;s a worth while read that is a must for all companies tendering for projects and all companies looking for developers</p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/12/why-traditional-%e2%80%9cfixed-bid%e2%80%9d-software-projects-usually-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PayFlow recurring billing with ActiveMerchant</title>
		<link>http://sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/</link>
		<comments>http://sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 04:47:47 +0000</pubDate>
		<dc:creator>James Kong</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[activemerchant]]></category>
		<category><![CDATA[Payflow]]></category>
		<category><![CDATA[Payment Gateway]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Recurring Billing]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=612</guid>
		<description><![CDATA[Today we are going to look at using ActiveMerchant to set up a recurring billing subscription with PayFlow .
PayFlow is Paypal&#8217;s payment gateway and you need to setup a PayFlow account.
IMPORTANT! This is separate from Paypal&#8217;s development sandbox. Follow these steps to setup a Payflow testing account

Go to https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-get-started-outside
 and fill in the details for [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to look at using ActiveMerchant to set up a recurring billing subscription with PayFlow .</p>
<p>PayFlow is Paypal&#8217;s payment gateway and you need to setup a PayFlow account.<br />
<strong>IMPORTANT!</strong> This is separate from Paypal&#8217;s development sandbox. Follow these steps to setup a Payflow testing account</p>
<ol>
<li>Go to <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-get-started-outside">https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-get-started-outside<br />
</a> and fill in the details for an account.</li>
<li>When you get to the page where you need to enter your payment information, hit Save and Exit. This will create a testing PayFlow account for you.</li>
<li>You will be sent an email with your partner ID and your vendor login. Take note of your partner ID as this will be important later.</li>
<li>You should now be able to login at <a href="https://manager.paypal.com/">https://manager.paypal.com/</a></li>
</ol>
<p>Now that you have a PayFlow account, you can use ActiveMerchant to setup payments. For now we will muck around in irb to test that methods out.</p>
<p>So lets open up irb and start by including the active merchant gem and setting ActiveMerchant to test mode</p>
<pre class="brush: ruby;">
kongy@Deadpool: $ irb
irb(main):001:0&gt; require 'rubygems'
irb(main):002:0&gt; require 'active_merchant'
irb(main):003:0&gt; ActiveMerchant::Billing::Base.mode = :test
</pre>
<p>Now lets setup the gateway.</p>
<pre class="brush: ruby;">
gateway = ActiveMerchant::Billing::PayflowGateway.new(:login =&gt; 'PAYFLOW_LOGIN', :password =&gt; 'PAYFLOW_PASSWORD', :partner =&gt; 'PARTNER_ID')
</pre>
<p>This creates the gateway that we will be using to request purchases. By default ActiveMerchant passes PAYPAL as the partner value if you leave it out. I believe that this is the default for US PayFlow account. For my Aussie one, I received a VSA partner_id. I would suggest putting it in there anyway.</p>
<p>PayFlow Testing only accepts testing credit cards numbers.  You can grab them from the PayFlow recurring billing documentation found <a href="https://cms.paypal.com/cms_content/US/en_US/files/developer/PayflowPro_RecurringBilling_Guide.pdf">here</a>. Here is a quick list which I can&#8217;t guarantee will be up to date.</p>
<table border="0">
<tbody>
<tr>
<td>American Express</td>
<td>378282246310005</td>
</tr>
<tr>
<td>American Express</td>
<td>371449635398431</td>
</tr>
<tr>
<td>American Express Corporate</td>
<td>378734493671000</td>
</tr>
<tr>
<td>Diners Club</td>
<td>30569309025904</td>
</tr>
<tr>
<td>Diners Club</td>
<td>38520000023237</td>
</tr>
<tr>
<td>Discover</td>
<td>6011111111111117</td>
</tr>
<tr>
<td>Discover</td>
<td>6011000990139424</td>
</tr>
<tr>
<td>JCB</td>
<td>3530111333300000</td>
</tr>
<tr>
<td>JCB</td>
<td>3566002020360505</td>
</tr>
<tr>
<td>MasterCard</td>
<td>5555555555554444</td>
</tr>
<tr>
<td>MasterCard</td>
<td>5105105105105100</td>
</tr>
<tr>
<td>Visa</td>
<td>4111111111111111</td>
</tr>
<tr>
<td>Visa</td>
<td>4012888888881881</td>
</tr>
<tr>
<td>Visa</td>
<td>4222222222222</td>
</tr>
</tbody>
</table>
<p>So lets create a Mastercard credit card.</p>
<pre class="brush: ruby;">
irb(main):004:0&gt; credit_card = ActiveMerchant::Billing::CreditCard.new( :number =&gt; '5105105105105100', :month =&gt; '9', :year =&gt; '2007', :first_name =&gt; 'Mal', :last_name =&gt; 'Reynolds', :verification_value =&gt; '123', :type =&gt; 'master' )
</pre>
<p>Now we are ready to start billing. If you want to setup a one time payment it is quite easy.</p>
<pre class="brush: ruby;">
irb(main):007:0&gt; response = gateway.purchase(1000, credit_card)
irb(main):008:0&gt; response.success?
=&gt; true
</pre>
<p>If you go into your Paypal Manager and search for transactions you should see it appear.</p>
<p>To setup a recurring billing we need to use the <b>recurring</b> method of the gateway. The recurring method accepts the amount in cents, the credit card object and the time intervals to charge the card, at a minimum. There are other options available which you can find <a href="http://activemerchant.rubyforge.org/classes/ActiveMerchant/Billing/PayflowGateway.html">here</a>. Lets charge $10/month</p>
<pre class="brush: ruby;">
irb(main):009:0&gt; response = gateway.recurring(100, credit_card, :periodicity =&gt; :monthly)
irb(main):010:0&gt; response.success?
=&gt; true
irb(main):011:0&gt; response.profile_id
=&gt; &quot;RT0000000002&quot;
</pre>
<p>You can view the recurring billings in your Paypal Manager by clicking on Service Settings > Recurring Billings > Manage Profiles. You will probably want to store the profile_id in your database for when you need to edit details of the recurring billing. You can do it quite simply by calling the <b>recurring</b> method again. Let&#8217;s change the amount we want to bill to $20/week.</p>
<pre class="brush: ruby;">
irb(main):0012:0&gt; response = gateway.recurring(2000, nil, :profile_id =&gt; &quot;RT0000000001&quot;,  :periodicity =&gt; :weekly)
irb(main):013:0&gt; response.success?
=&gt; true
</pre>
<p>You can see here that we no longer need to pass in the credit card since we have the profile_id. We update the amount, and change the periodicity of the billing.</p>
<p>And that&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone development tips</title>
		<link>http://sentia.com.au/2009/10/iphone-development-tips/</link>
		<comments>http://sentia.com.au/2009/10/iphone-development-tips/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 03:20:36 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iphone development]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=604</guid>
		<description><![CDATA[Tip #1: Loading screen
To get your app looking cool and having a loading image come up as the application is loading simply add a file called &#8220;Default.png&#8221; size 320 × 480 to your xcode project and it will automatically show up as the application is loading.
Tip #2: Network Activity Icon
So your application connects to the internet and [...]]]></description>
			<content:encoded><![CDATA[<h2>Tip #1: Loading screen</h2>
<p>To get your app looking cool and having a loading image come up as the application is loading simply add a file called &#8220;Default.png&#8221; size 320 × 480 to your xcode project and it will automatically show up as the application is loading.</p>
<h2>Tip #2: Network Activity Icon</h2>
<p>So your application connects to the internet and you want to add those little touches to let the user know its connecting. Well the simple option is to show the network activity indicator. To do that its as simple as setting a variable like so</p>
<pre class="brush: cpp;">
   [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
</pre>
<p>Then to hide it its simply</p>
<pre class="brush: cpp;">
   [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
</pre>
<p>Now you can wire it up to be a little more logical in that way it determines if its working or not but ill leave that to you. Keep an eye out as more tips are on the way</p>
<h3>Tip #3: Detect if running in iPhone simulator</h3>
<p>What to run different code depending if you running in the iPhone simulator or not. Just use the following if statement.</p>
<pre class="brush: cpp;">
  #if TARGET_IPHONE_SIMULATOR
    // simulator code
  #else
    // production code
  #endif
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/10/iphone-development-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It has to be 57px X 57px</title>
		<link>http://sentia.com.au/2009/10/it-has-to-be-57px-x-57px/</link>
		<comments>http://sentia.com.au/2009/10/it-has-to-be-57px-x-57px/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 00:34:23 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iphone development]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=601</guid>
		<description><![CDATA[I fell into this trap again of making my icon for a iPhone app l am currently working on not exactly 57&#215;57 pixels. I have the height set at 57 but the width because of the auto resizing in Photoshop it was suggesting l make it 54px, thus when l looked at the logo it [...]]]></description>
			<content:encoded><![CDATA[<p>I fell into this trap again of making my icon for a iPhone app l am currently working on not exactly 57&#215;57 pixels. I have the height set at 57 but the width because of the auto resizing in Photoshop it was suggesting l make it 54px, thus when l looked at the logo it never looked right as the bottom of it was cropped off.</p>
<p><strong>Remember people iPhone app icons must be 57&#215;57 exactly and if your image looks wrong at those sizes well bad luck fix it</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/10/it-has-to-be-57px-x-57px/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When to use Nested Controllers in your Rails apps</title>
		<link>http://sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/</link>
		<comments>http://sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 00:27:43 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[nested controllers]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=575</guid>
		<description><![CDATA[Nested controllers are great. I don&#8217;t care that they have a stigma attached to them they work well and make sense especially if your rails application has a Admin section for example. This allows you to easy separate the admin logic into its own controllers etc keeping your code clean and easy to manage.
So thats [...]]]></description>
			<content:encoded><![CDATA[<p>Nested controllers are great. I don&#8217;t care that they have a stigma attached to them they work well and make sense especially if your rails application has a Admin section for example. This allows you to easy separate the admin logic into its own controllers etc keeping your code clean and easy to manage.</p>
<p>So thats what we are going to do for this example.</p>
<h2>Step 1.  Create your admin controller</h2>
<p>You can use whichever process works best for you, but for this we are going to use script/generate:</p>
<pre class="brush: ruby;">
 ./script/generate controller admin
</pre>
<h2>Step 2.  Create your user controller</h2>
<p>You can use whichever process works best for you, but for this we are going to use script/generate:</p>
<pre class="brush: ruby;">
 ./script/generate controller admin/users
</pre>
<h2>Step 3.  Check to ensure proper inheritance</h2>
<p>The nested users controller should look something like so:</p>
<pre class="brush: ruby;">
class Admin::UsersController &lt; ApplicationController
end
</pre>
<h2>Step 4. Create the Routes</h2>
<p>The nested users controller should look something like so:</p>
<pre class="brush: ruby;">
map.namespace :admin do |admin|
  admin.resources :users
end
</pre>
<p>Before rails 2+ you had to do like like we have below. Personally l don&#8217;t mind it makes it a little easier to read but either option works fine</p>
<pre class="brush: ruby;">
map.resource(:admin) do |admin|
  admin.resources(:users, :controller =&gt; 'admin/users')
end
</pre>
<h2>Step 5. Wait there is no step 5 your done</h2>
<p>Now when you need to link to any of these actions its very simple keeping in mind that users is nested under the admin controller so all you have to do to create a link that goes to the index action on the nested users controller is add the admin prefix before</p>
<pre class="brush: ruby;">
 link_to &quot;Users&quot;, admin_users_url
</pre>
<p>The same applies when you are wanting to link to the show action of users all you do is loose the &#8220;s&#8221; on users as you would normally</p>
<pre class="brush: ruby;">
 link_to &quot;View User&quot;, admin_user_url(@user)
</pre>
<p>You can see a list of all the routes you have available to you by going to the root directory of your project in terminal and typing</p>
<pre class="brush: ruby;">
rake routes
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scoping UserSession with Authlogic</title>
		<link>http://sentia.com.au/2009/09/scoping-usersession-with-authlogic/</link>
		<comments>http://sentia.com.au/2009/09/scoping-usersession-with-authlogic/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 06:44:28 +0000</pubDate>
		<dc:creator>James Kong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=498</guid>
		<description><![CDATA[I like using subdomains to create a more personalised web application experience for the user. Having their own URL to access the application allows them to feel a sense of ownership. There are many ways you can do this(click here for one) but I specifically want to look at scoping your user sessions so that [...]]]></description>
			<content:encoded><![CDATA[<p>I like using subdomains to create a more personalised web application experience for the user. Having their own URL to access the application allows them to feel a sense of ownership. There are many ways you can do this(<a href="http://37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails">click here for one</a>) but I specifically want to look at scoping your user sessions so that users cannot login to other user&#8217;s accounts. Doing this with <a title="AuthLogic" href="http://github.com/binarylogic/authlogic" target="_self">AuthLogic</a> is surprisingly easy.</p>
<p>Assuming you subdomain names come from an Account model, add this line of code.</p>
<pre class="brush: ruby;">
   class Account &lt; ActiveRecord::Base
   authenticates_many :user_sessions
end
</pre>
<p>In your UserSessionController you can now scope your user sessions to the account.</p>
<pre class="brush: ruby;">

class UserSessionsController &lt; ApplicationController

    def create
       @user_session = @current_account.user_sessions.build(params[:user_session])
       if @user_session.save
          flash[:notice] = &quot;Login successful!&quot;
          redirect_back_or_default dashboard_path
        else
          render :action =&gt; :new
        end
    end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sentia.com.au/2009/09/scoping-usersession-with-authlogic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
