<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum]]></title>
	<link rel="self" href="http://railsforum.com/extern.php?action=feed&amp;type=atom"/>
	<updated>2010-07-31T15:32:46Z</updated>
	<generator>PunBB</generator>
	<id>http://railsforum.com/index.php</id>
		<entry>
			<title type="html"><![CDATA[Time_Select with :Prompt causing chaos... need helps!]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40183&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Ive got a Form for Event.<br />Ive got a DateTime field called Showtime</p><p>I offer users 2 pull downs for Hour + Minute for this showtime..</p><p>If in my view i use : </p><p>&lt;%= f.time_select :showtime, {:minute_step =&gt; 15} %&gt; </p><p>this will function properly but it chooses the current time (when the form is filled in) by default. As Showtime is optional, i wanted to include some prompts in the menus.. so im now using this:</p><p>&lt;%= f.time_select :showtime, {:minute_step =&gt; 15, :prompt =&gt; true} %&gt; </p><p>this displays fine in the view and works if only HOURS are chosen but if Hours + Minutes are chosen rails throws this error : </p><p>ActiveRecord::MultiparameterAssignmentErrors in EventsController#create<br />1 error(s) on assignment of multiparameter attributes</p><p>Any clues?<br />thank you!</p>]]></summary>
			<author>
				<name><![CDATA[BradHodges]]></name>
				<uri>http://railsforum.com/profile.php?id=30262</uri>
			</author>
			<updated>2010-07-31T15:32:46Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40183&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Will paginate question]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40186&amp;action=new"/>
			<summary type="html"><![CDATA[<p>I have the following code:</p><div class="codebox"><pre><code>@projetos = Array.new
 for permissao in @permissao
    @proj = Projeto.paginate :page =&gt; params[:page], :per_page =&gt; 10, :order =&gt; &quot;data_de_termino&quot;, :conditions =&gt; [&quot;id = ?&quot;, permissao.projeto.id]
      for proj in @proj
        @projetos &lt;&lt; proj
      end
 end
 @projetos.sort! { |a,b| a.data_de_termino &lt;=&gt; b.data_de_termino }</code></pre></div><p>It lists @projetos just fine, but if i want to make a pagination of @projetos (to show 10 projetos per page)<br />How can i do that in this case?<br />&#039;Cause @projetos will not be a Projeto.paginate, because @projetos allready is a array with everything I need.</p>]]></summary>
			<author>
				<name><![CDATA[BradHodges]]></name>
				<uri>http://railsforum.com/profile.php?id=36372</uri>
			</author>
			<updated>2010-07-31T15:22:21Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40186&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Method from within other method]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40191&amp;action=new"/>
			<summary type="html"><![CDATA[<p>I am trying to call question_and_annos from within questions_and_answers and&nbsp; pass &quot;complete_question&quot; as an argument. I get the error undefined local variable or method `complete_question&#039; for #&lt;Question:0x103228d10&gt;</p><p>Excuse the very basic level of code as I am still a beginner (any suggestions are appreciated though).</p><p>Here are the 2 methods:</p><p>def question_and_annos(x) <br />&nbsp; &nbsp; answer_list = [<br />&nbsp; &nbsp; &nbsp; [self.incorrect_ans_1, self.incorrect_anno_1],<br />&nbsp; &nbsp; &nbsp; [self.incorrect_ans_2, self.incorrect_anno_2],<br />&nbsp; &nbsp; &nbsp; [self.incorrect_ans_3, self.incorrect_anno_3],<br />&nbsp; &nbsp; &nbsp; [self.incorrect_ans_4, self.incorrect_anno_4]<br />&nbsp; &nbsp; &nbsp; ].shuffle<br />&nbsp; &nbsp; &nbsp; # Randomly insert the correct answer and response into the pre-shuffled array.<br />&nbsp; &nbsp; &nbsp; random_insert = rand(4)<br />&nbsp; &nbsp; &nbsp; answer_list.insert(random_insert,[&quot;#{correct_ans_1} *&quot;,self.correct_anno])<br />&nbsp; &nbsp; &nbsp; #&nbsp; Create Hash of virtual attributes.<br />&nbsp; &nbsp; &nbsp; #&nbsp; Convert from array to string to display in view &quot;questions.show.html.erb&quot;.</p><p>&nbsp; &nbsp; &nbsp; shuffled = {<br />&nbsp; &nbsp; &nbsp; &nbsp; :complete_question =&gt; &quot;#{question} \r\r\r A.&nbsp; #{answer_list[0][0]}\r B.&nbsp; #{answer_list[1][0]}\r C.&nbsp; #{answer_list[2][0]}\r D.&nbsp; #{answer_list[3][0]}\r E.&nbsp; #{answer_list[4][0]}\r&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; :anno_a =&gt; answer_list[0][1],<br />&nbsp; &nbsp; &nbsp; &nbsp; :anno_b =&gt; answer_list[1][1],<br />&nbsp; &nbsp; &nbsp; &nbsp; :anno_c =&gt; answer_list[2][1],<br />&nbsp; &nbsp; &nbsp; &nbsp; :anno_d =&gt; answer_list[3][1],<br />&nbsp; &nbsp; &nbsp; &nbsp; :anno_e =&gt; answer_list[4][1]<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; if x == &quot;complete_question&quot;: result = shuffled[complete_question]<br />&nbsp; &nbsp; &nbsp; &nbsp; elsif x == &quot;anno_1&quot;: result = shuffled[anno_1]<br />&nbsp; &nbsp; &nbsp; &nbsp; elsif x == &quot;anno_2&quot;: result = shuffled[anno_2]<br />&nbsp; &nbsp; &nbsp; &nbsp; elsif x == &quot;anno_3&quot;: result = shuffled[anno_3]<br />&nbsp; &nbsp; &nbsp; &nbsp; elsif x == &quot;anno_4&quot;: result = shuffled[anno_4]<br />&nbsp; &nbsp; &nbsp; &nbsp; elsif x == &quot;anno_5&quot;: result = shuffled[anno_5]<br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; end<br />&nbsp; <br />&nbsp; &nbsp;<br />def question_with_answers<br />&nbsp; x = question_and_annos(complete_question)<br />end</p><p>Thanks,</p><p>DC</p>]]></summary>
			<author>
				<name><![CDATA[BradHodges]]></name>
				<uri>http://railsforum.com/profile.php?id=32545</uri>
			</author>
			<updated>2010-07-31T15:06:06Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40191&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[MYSQL is not recognized]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40192&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hi,</p><p>I am new RoR Learner...</p><p>When I installed MYSQL and then tried to connet it gives me below error.<br />C:\rubydev\ch06\mysql -u root -p<br />&#039;mysql&#039; is not recognized as a internal or external command,<br />operable program or batch file.</p><p>Please help</p>]]></summary>
			<author>
				<name><![CDATA[BradHodges]]></name>
				<uri>http://railsforum.com/profile.php?id=42131</uri>
			</author>
			<updated>2010-07-31T14:56:05Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40192&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding second database, SQLServer, ruby_odbc on Windows]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40197&amp;action=new"/>
			<summary type="html"><![CDATA[<p>I need to add SQLServer database connectivity to existing MySQL based app.</p><p>I&#039;m deployed on Solaris,&nbsp; but I develop on Windows.&nbsp; </p><p>So the first hurdle is getting my windows dev box connected.</p><p>rails 2.3.8<br />I loaded activerecord-sqlserver-adapter 2.3.8 (versions are the same, is that just coincidence?)</p><p>Then came ruby_odbc, and it got confusing with versions and windows binaries, etc.</p><p>Any attempt to install the gem will fail, because they all eventually assume their Unix based and start trying to build *****,&nbsp; which barfs on a windows box.</p><p>So I read about certain binaries for Windows,&nbsp; odbc.so and odbc_utf8.so,&nbsp; that must be installed in the <strong>&#039;.../ruby/1.8/i386-msvcrt directory of MSVC based Ruby 1.8 installations&#039;</strong></p><p>ruby -v<br />ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]</p><p>I don&#039;t have i386-msvcrt directory,&nbsp; but I do have i386-mswin32 directory,&nbsp; so I copied those two binaries there, seems correct??</p><p>But I&#039;m sure I&#039;m still missing stuff as a result of the gem install ruby_odbc.099991 failing!</p><p>How do I get ruby_odbc installed properly OTHER than installing those binaries?</p>]]></summary>
			<author>
				<name><![CDATA[BradHodges]]></name>
				<uri>http://railsforum.com/profile.php?id=10736</uri>
			</author>
			<updated>2010-07-31T14:50:05Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40197&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Edit multiple roles in one page]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40196&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Ok, what i would like to do is list all users on one page and beside them roles where i can choose what roles they have. Right now what i have managed to do is this: <a href="http://gist.github.com/501998">http://gist.github.com/501998</a> It displays all the users and roles but when i want to submit then in the params is this:</p>]]></summary>
			<author>
				<name><![CDATA[soend]]></name>
				<uri>http://railsforum.com/profile.php?id=29673</uri>
			</author>
			<updated>2010-07-31T10:40:24Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40196&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Recommend ROR for charity organisation? Inventory management app]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=35190&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hello</p><p>I would be interested in hearing people`s thoughts on the suitability of using Ruby-on-Rails to develop (or extend an existing) inventory management application for a Charity Organisation.</p><p>The organisation is in developing south american country and I expect ROR is not a framework that local developers will know. I could build the system for them in ROR but when I leave it may not be possible for them to maintain it. On the other hand I don´t have enough familiarity with more common web development languages, so I couldn´t provide them with a web app in java or .net.</p><p>The app needs to record receipt and onward delivery of medical supplies.</p><p>Any thoughts?</p>]]></summary>
			<author>
				<name><![CDATA[lesssoftware]]></name>
				<uri>http://railsforum.com/profile.php?id=23168</uri>
			</author>
			<updated>2010-07-31T08:56:06Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=35190&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[4Easysoft DVD to iPad Converter (Win&Mac) - Rip DVD to iPad HD real 10]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40195&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Have you got an iPad in your hand? Have you want to enjoy the newest HD DVD movies with your iPad? I think there are two “YES” for the questions. So the following tips I will show you how to accomplish your dreams.<br />The software you will need is 4Easysoft dvd-to-ipad-converter and mac-dvd-to-ipad-converter, the two powerful iPad Converter software provides everyone the best way to convert DVD to iPad on Windows and Mac with fast speed and high quality.<br />Follow the optimal settings for windows users to get excellent playback quality.<br />No.1<br />iPad HD H.264 720p Video(*.mp4)<br />Video Codec: H.264<br />Size: 1280*720<br />BitRate: 4000kbps<br />FrameRate: 30.00fps<br />Audio Codec: AAC<br />SamplerRate: 48000 Hz<br />BitRate: 160000bps<br />Channel: 2<br />No.2<br />iPad H.264 Video(*.mp4)<br />Video Codec: H.264<br />Size: 768*576<br />BitRate: 2500kbps<br />FrameRate: 30.00fps<br />Audio Codec: AAC<br />SamplerRate: 48000 Hz<br />BitRate: 160000bps<br />Channel: 2<br />No.3<br />iPad MPEG-4 Video(*.mp4)<br />Video Codec: H.264<br />Size: 640*480<br />BitRate: 2500kbps<br />FrameRate: 30.00fps<br />Audio Codec: AAC<br />SamplerRate: 48000 Hz<br />BitRate: 160000bps<br />Channel: 2<br />I hope it will be of great help for you<br />Free Download for trial:<br />For Mac user: mac-dvd-to-ipad-converter, when you free download 4Easysoft DVD to iPad Converter for Mac, install this program and launch it, the beautiful interface will pop up like this.<br />For Windows user:dvd-to-ipad-converterl, when you run this program and load your DVD movies into it, the user-friendly screenshot will be shown as follows.<br />----------------------------------------------------------------------------------------------------------------------<br />4Easysoft total-video-converter, dvd-to-ipad-suite, iphone-4g-rip, m2ts-converter.</p>]]></summary>
			<author>
				<name><![CDATA[saxonlogins]]></name>
				<uri>http://railsforum.com/profile.php?id=42176</uri>
			</author>
			<updated>2010-07-31T08:44:33Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40195&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to Rip Blu-ray M2TS files to iPad/iPhone 4]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40194&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Do you want to rip your Blu-ray movies to your iPad or iPhone 4 video format and enjoy the movies on your iPad/iPhone 4?<br />4Easysoft Blu Ray Ripper, all-in-one Blu-ray DVD disc converter, provides an easy and completed way to rip Blu-ray discs and convert Blu-ray M2TS video to iPad/iPhone 4/iPod HD videos and popular common video formats. With blu-ray-ripper, you can easily rip Blu-ray to MP4, AVI, WMV, MOV, FLV, DivX and more for PSP, Wii, etc. players. Besides, 4Easysoft blu-ray-ripper can also extract Blu-ray DVD audio and capture your favorite pictures from Blu-ray DVD movie.</p><p>Advantages of 4Easysoft Blu Ray Ripper<br />- 100% clean to free download and 300% fast speed to rip blu-ray disc.<br />- Convert BD/DVD main movies to iPad/iPhone 4.<br />- Decrypt Blu-ray DVD with the latest MKB<br />4Easysoft Blu-ray ripper supports Blu-ray DVD MKB version up to v17, which means it can decrypt any Blu-ray DVD movies on market so far.<br />- Append crisp effects to enhance media experience<br />4Easysoft Blu Ray Ripper allows you to adjust the brightness, contrast and saturation to make the images more expressive and vivid.<br />- Make Blu-ray movie fit for 4:3 or 16:9 displays<br />4Easysoft Blu Ray Ripper is very flexible in meeting the needs to get Blu-ray movie to play on monitor with 4:3, 16:9 or other aspect ratio.<br />- Overlay Blu-ray movie with different styles of watermarks<br />This Blu-ray ripper provides handy watermark rendering for the needs to insert a logo or a signature.<br />- Convert BD/DVD to iPad/iPhone 4<br />With the flexible movie loading method, you can rip Blu-ray to iPad/iPhone 4, convert Blu-ray ISO to iPad/iPhone 4, convert DVD to iPad/iPhone 4, DVD ISO to iPad/iPhone 4, and DVD IFO to iPad/iPhone 4 with perfect video and audio synchronization.</p><p>More related Blu-ray software recommend for you as follows.<br />Blu-ray to MP4 Ripper</p>]]></summary>
			<author>
				<name><![CDATA[saxonlogins]]></name>
				<uri>http://railsforum.com/profile.php?id=42176</uri>
			</author>
			<updated>2010-07-31T08:43:32Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40194&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Preventing Event Bubbling]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40193&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hello,<br />I&#039;m new to rails, and i think I&#039;m struggling with a simple problem.</p><p>I&#039;m trying to build a simple menu.&nbsp; I have a div, which when moused over, shows a second div.<br />When the user mouses out of this second div it should hide again.&nbsp; I have text links in this second div, and when the user mouses over these links the div hides because of event bubbling, i think.</p><p>Is there a simple way to prevent this bubbling?&nbsp; I&#039;d trying to stay clear of jquery. I wondered if there was a way to do it in prototype?</p><p>Thanks,</p><p>Tim<br /></p><div class="codebox"><pre><code>&lt;div id=&quot;nav&quot; onmouseover=&quot;Effect.Appear(&#039;nav2&#039;, { duration: 0.1 }); return false;&quot; &gt;
  nav
  &lt;div id=&quot;nav2&quot; style=&quot;display:none;&quot;onmouseout=&quot; Effect.Fade(&#039;nav2&#039;, { duration: 0.1 }); return false;&quot; &gt;  
    menu items
    &lt;a href=&quot;http://www.example.com&quot; onclick=&quot;helloWorld(&#039;Joe&#039;); removeHandler(this);&quot;&gt;Joe&lt;/a&gt;  
  &lt;/div&gt;
&lt;/div&gt;</code></pre></div>]]></summary>
			<author>
				<name><![CDATA[gonzotim]]></name>
				<uri>http://railsforum.com/profile.php?id=18177</uri>
			</author>
			<updated>2010-07-31T08:10:52Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40193&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Redirecting old URLs to new URLs]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40161&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hi,</p><p>I recently permalinked my URLs; however now I have the issue of redirecting the (many) old URLs to the new URLs.<br />Basically my new permalinked system goes like this: CatPerm/TutPerm. However there are many URLs I need to redirect to this permalinked URL:</p><p>site.com/CatID/TutID<br />site.com/CatPerm/TutID<br />site.com/CatID/TutPerm<br />site.com/tutorials/TutID<br />site.com/categories/CatID/tutorials/TutID</p><p>There might also be some others that I have missed.</p><p>Is there any easy way to redirect these to my nice new permalinked URLs? (I want to keep all the links to my site etc, but don&#039;t want to be &quot;done&quot; for duplicate content)</p><p>Please Help,</p><p>Regards,</p><p>Joe</p>]]></summary>
			<author>
				<name><![CDATA[Joesavage1]]></name>
				<uri>http://railsforum.com/profile.php?id=42064</uri>
			</author>
			<updated>2010-07-31T06:51:25Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40161&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding new rails plugin to Netbeans]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40037&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hi,</p><p>I am using Netbeans 6.5.1(on windows) for rails. I am trying to add new plugins from the rails console like for example</p><p>ruby script/plugin install svn://svn.seesaw.it/tabnav</p><p>But this pops the foll error :</p><p>(irb):1: syntax error, unexpected tIDENTIFIER, expecting kDO or &#039;{&#039; or &#039;(&#039; ruby script/plugin install svn://svn.seesaw.it/tabnav</p><p>I will appreciate if someone can let me know how to correct this error and how to install any plugin in Netbeans successfully?</p><p>Thanks</p>]]></summary>
			<author>
				<name><![CDATA[datarecovery]]></name>
				<uri>http://railsforum.com/profile.php?id=33329</uri>
			</author>
			<updated>2010-07-31T06:42:55Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40037&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[We're sorry, but something went wrong.]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=39455&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Just set up Ruby on Rails in Windows environment.&nbsp; Created very basic application.&nbsp; Getting the message: &#039;We&#039;re sorry, but something went wrong.&#039;</p><p>Even if I just enter: http://localhost:3000/ in the bowser and then click on &#039;about your application&#039;s environment&#039; getting this message.</p><p>Same message if I enter: http://localhost:3000/app/greeting - referencing my very first Ruby app.</p><p>From looking through other forum messages seems to be a regular issue for people new to RoR.&nbsp; </p><p>Does this indicate something has gone wrong in the basic install/ config of RoR?</p><br /><p>All help gratefully received.</p>]]></summary>
			<author>
				<name><![CDATA[rubyprogrammer]]></name>
				<uri>http://railsforum.com/profile.php?id=40455</uri>
			</author>
			<updated>2010-07-31T05:49:14Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=39455&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[has_many]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40190&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hello, I am wondering about the attributes belongs_to and has_many, etc as I put them in the model file, sure it makes sense, but what does it actually do? I don&#039;t think I see any result from putting that in those files. How do I make one thing have many of another. Like a user has many comments, if I have the reference to the user, how do I go through or access his comments?</p>]]></summary>
			<author>
				<name><![CDATA[CodaBrink]]></name>
				<uri>http://railsforum.com/profile.php?id=42161</uri>
			</author>
			<updated>2010-07-30T23:10:02Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40190&amp;action=new</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odd Loads on create]]></title>
			<link rel="alternate" href="http://railsforum.com/viewtopic.php?id=40167&amp;action=new"/>
			<summary type="html"><![CDATA[<p>Hi everyone,</p><p>This is my first Rails app (Rails 2.3.8) so I apologize if I&#039;ve made any simple mistakes.</p><p>Within a model (called PeriodOfCare) I have a method that does this:</p><div class="codebox"><pre><code>IndicatorData.create(:period_of_care_id   =&gt; self.id, 
                                  :indicator_code        =&gt; indicator_code, 
                                  :time_period_id        =&gt; time_period_id,
                                  :observation             =&gt; i,
                                  :discrete                   =&gt; false,
                                  :system_id                =&gt; system_id)</code></pre></div><p>It actually ends up doing this a whole lot, about a hundred times. The action that ends up executing this code goes very slowly. I started running through the code to see what is happening and in my log it turns out this create results in all of this (I put debug statements before and after the create to make sure it wasn&#039;t coming from somewhere else):</p><div class="codebox"><pre><code>  ←[4;35;1mUser Load (3.0ms)←[0m   ←[0mSELECT * FROM &quot;users&quot; WHERE (&quot;users&quot;.&quot;id&quot; = 1) LIMIT 1←[0m
  ←[4;36;1mCACHE (0.0ms)←[0m   ←[0;1mSELECT * FROM &quot;users&quot; WHERE (&quot;users&quot;.&quot;id&quot; = 1) LIMIT 1←[0m
  ←[4;35;1mPeriodOfCare Load (3.0ms)←[0m   ←[0mSELECT * FROM &quot;periods_of_care&quot; WHERE (&quot;periods_of_care&quot;.&quot;id&quot; = 29) ←[0m
  ←[4;36;1mPatient Load (3.0ms)←[0m   ←[0;1mSELECT * FROM &quot;patients&quot; WHERE (&quot;patients&quot;.&quot;id&quot; = 5) ←[0m
  ←[4;35;1mCACHE (0.0ms)←[0m   ←[0mSELECT * FROM &quot;users&quot; WHERE (&quot;users&quot;.&quot;id&quot; = 1) LIMIT 1←[0m
  ←[4;36;1mCACHE (0.0ms)←[0m   ←[0;1mSELECT * FROM &quot;users&quot; WHERE (&quot;users&quot;.&quot;id&quot; = 1) LIMIT 1←[0m
  ←[4;35;1mPatient Load (2.0ms)←[0m   ←[0mSELECT &quot;patients&quot;.id FROM &quot;patients&quot; WHERE (&quot;patients&quot;.&quot;patient_id&quot; = 5 AND &quot;p
atients&quot;.site = &#039;ISIS&#039; AND &quot;patients&quot;.id &lt;&gt; 5) LIMIT 1←[0m
  ←[4;36;1mSQL (2.0ms)←[0m   ←[0;1mINSERT INTO &quot;indicator_data&quot; (&quot;observation&quot;, &quot;created_at&quot;, &quot;period_of_care_id&quot;, &quot;upda
ted_at&quot;, &quot;system_id&quot;, &quot;discrete&quot;, &quot;created_by&quot;, &quot;updated_by&quot;, &quot;indicator_data&quot;, &quot;indicator_code&quot;, &quot;time_period_id&quot;) VALU
ES(1, &#039;2010-07-29 15:49:04.006724&#039;, 29, &#039;2010-07-29 15:49:04.006724&#039;, 1, &#039;t&#039;, NULL, NULL, NULL, 519, 3) RETURNING &quot;id&quot;←[
0m</code></pre></div><p>If I understand this correctly it is loading from the Users table multiple times, the patients table multiple times and the periods of care table. However I have no idea why it would be loading from these tables. Neither my PeriodOfCare model nor my IndicatorData model ever mention the User model and there is no reason it should be loading from the patients table. </p><p>I have made sure no validations are running on IndicatorData on create. I have also made sure all of the variables it is using in the create are local variables. I have read around and it seems that the best thing to do would be hand craft some SQL, especially since I am running so many creates. Even if I do that I would really like to understand what exactly is going on here.</p><p>Any Ideas?</p><p>Thanks,<br />Patrick</p>]]></summary>
			<author>
				<name><![CDATA[jamesw]]></name>
				<uri>http://railsforum.com/profile.php?id=42122</uri>
			</author>
			<updated>2010-07-30T21:13:12Z</updated>
			<id>http://railsforum.com/viewtopic.php?id=40167&amp;action=new</id>
		</entry>
</feed>
