<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Rails - Auto Assign Created By and Updated By</title>
	<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/</link>
	<description>Web Development and Design, and Anything That Matters</description>
	<pubDate>Mon, 13 Oct 2008 08:40:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.1</generator>

	<item>
		<title>by: Herryanto Siatono</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90961</link>
		<pubDate>Thu, 07 Aug 2008 05:56:19 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90961</guid>
					<description>Chris the !user.nil? for created_by has been checked earlier, while created_by.nil? check is not to auto-assign, if it has been manually assign.</description>
		<content:encoded><![CDATA[<p>Chris the !user.nil? for created_by has been checked earlier, while created_by.nil? check is not to auto-assign, if it has been manually assign.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90823</link>
		<pubDate>Wed, 06 Aug 2008 11:32:52 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90823</guid>
					<description>I think I may have found the issue.  It must be difference between MySQL on Windows and MySQL on my Linux server... My created_by field is set to be not null with a default value of 0.  On Windows usermonitor works fine and updates both the created_by and updated_by fields.  But, when it is executing on Linux it seems like created_by already has the default value of 0 and it fails the condition &quot;&amp;#38;&amp;#38; created_by.nil?&quot;.  Shouldn't this condition be &quot; &amp;#38;&amp;#38; !user.nil?&quot; just like it is in the update_with_user method?</description>
		<content:encoded><![CDATA[<p>I think I may have found the issue.  It must be difference between MySQL on Windows and MySQL on my Linux server&#8230; My created_by field is set to be not null with a default value of 0.  On Windows usermonitor works fine and updates both the created_by and updated_by fields.  But, when it is executing on Linux it seems like created_by already has the default value of 0 and it fails the condition &#8220;&amp;&amp; created_by.nil?&#8221;.  Shouldn&#8217;t this condition be &#8221; &amp;&amp; !user.nil?&#8221; just like it is in the update_with_user method?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Herryanto Siatono</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90772</link>
		<pubDate>Wed, 06 Aug 2008 05:12:45 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90772</guid>
					<description>@Chris, I didn't encounter such problem before, you probably have to track ruby-debug with  or println some comments to track what's going on.</description>
		<content:encoded><![CDATA[<p>@Chris, I didn&#8217;t encounter such problem before, you probably have to track ruby-debug with  or println some comments to track what&#8217;s going on.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90599</link>
		<pubDate>Tue, 05 Aug 2008 02:57:03 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-90599</guid>
					<description>I have installed this and it is working perfectly on my development computer.  However, I have pushed it out to my test server and it is only updating &quot;updated_by&quot; and not &quot;created_by&quot;.  Any ideas on what the problem could be?</description>
		<content:encoded><![CDATA[<p>I have installed this and it is working perfectly on my development computer.  However, I have pushed it out to my test server and it is only updating &#8220;updated_by&#8221; and not &#8220;created_by&#8221;.  Any ideas on what the problem could be?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Herryanto Siatono</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-37061</link>
		<pubDate>Wed, 15 Aug 2007 01:29:37 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-37061</guid>
					<description>@Daryl, there's no thread safety issue, yep it's okay to use. Yeah I would say no impact. I've been using it since day one, no issue at all.</description>
		<content:encoded><![CDATA[<p>@Daryl, there&#8217;s no thread safety issue, yep it&#8217;s okay to use. Yeah I would say no impact. I&#8217;ve been using it since day one, no issue at all.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Daryl</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-37055</link>
		<pubDate>Tue, 14 Aug 2007 23:38:54 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-37055</guid>
					<description>Despite your thread safety, is this method still okay to use?
Is it overkill or is there no impact over the traditional method?
Do you still use this method? =)</description>
		<content:encoded><![CDATA[<p>Despite your thread safety, is this method still okay to use?<br />
Is it overkill or is there no impact over the traditional method?<br />
Do you still use this method? =)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Herryanto Siatono</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-24803</link>
		<pubDate>Sat, 14 Apr 2007 01:52:34 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-24803</guid>
					<description>@Platte Daddy, yeah I realized that after I delve more into rails, was a newbie back then. Thanks for the update. I've put up a note in my post.</description>
		<content:encoded><![CDATA[<p>@Platte Daddy, yeah I realized that after I delve more into rails, was a newbie back then. Thanks for the update. I&#8217;ve put up a note in my post.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Platte Daddy</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-24781</link>
		<pubDate>Fri, 13 Apr 2007 18:41:24 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-24781</guid>
					<description>Did you know that Rails keeps each request isolated? It's built on a CGI model that chucks everything after each request. You don't have to worry about thread safety per request.

The only time you would need to worry about thread safety in Rails is if you're working with threaded code of your own.</description>
		<content:encoded><![CDATA[<p>Did you know that Rails keeps each request isolated? It&#8217;s built on a CGI model that chucks everything after each request. You don&#8217;t have to worry about thread safety per request.</p>
<p>The only time you would need to worry about thread safety in Rails is if you&#8217;re working with threaded code of your own.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Herryanto Siatono</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-8460</link>
		<pubDate>Fri, 22 Dec 2006 18:29:01 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-8460</guid>
					<description>It really depends, Vidal, feel free some people just store id in session[:user] while some store the user object. 

Feel free to tweak the codes around to meet your needs. :)</description>
		<content:encoded><![CDATA[<p>It really depends, Vidal, feel free some people just store id in session[:user] while some store the user object. </p>
<p>Feel free to tweak the codes around to meet your needs. :)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Vidal Graupera</title>
		<link>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-7101</link>
		<pubDate>Tue, 28 Nov 2006 02:16:27 +0000</pubDate>
		<guid>http://www.pluitsolutions.com/2006/08/15/rails-auto-assign-created-by-and-updated-by/#comment-7101</guid>
					<description>This is helpful. Thanks. However, something is not quite right with this code. Typically, session[:user] is an integer ID, so you have  current_user.class.find where this is a Fixnum and not User object.</description>
		<content:encoded><![CDATA[<p>This is helpful. Thanks. However, something is not quite right with this code. Typically, session[:user] is an integer ID, so you have  current_user.class.find where this is a Fixnum and not User object.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
