<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>e168f08 - Latest Comments in Assignment 3, Milestone III</title><link>http://e168f08.disqus.com/</link><description></description><atom:link href="http://e168f08.disqus.com/assignment_3_milestone_iii/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 13 Feb 2009 18:13:02 -0000</lastBuildDate><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-6250106</link><description>Did anyone implement the compare function for the extra credit?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vaughanatworld</dc:creator><pubDate>Fri, 13 Feb 2009 18:13:02 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4297360</link><description>Very good -- great sleuthing. I suppose I would say that there's a pedagogical advantage for the hidden field for web app programming generally, but I'm missing out helping people do it in a more Rails-esque way!
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Tue, 09 Dec 2008 17:53:19 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4297285</link><description>Following up rather late, here:  the reason the id from the previous request isn't getting used is that the new URL has a different action from that request.  The Rdoc does explain this, a bit cryptically, in bits that I didn't quote above, referring to a hierarchy.  So if you specify a different controller, then neither the action nor the id gets copied into the new URL, and if you specify a different action, the old id gets dropped.  This is addressed somewhat more clearly on pages 415-417 of AWDR.  If we really wanted to use keep the id in the URL in this case, instead of (or in addition to) putting it in a hidden form variable, we can either include it explicitly, or use :overwrite_params to change the :action while retaining the following parameters</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Morris</dc:creator><pubDate>Tue, 09 Dec 2008 17:49:31 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4298152</link><description>In this case, I think the hidden field is Rails-esque, because it 
&lt;br&gt;greatly simplifies the code for the action, by putting everything 
&lt;br&gt;into the hash that gets passed to new().</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Morris</dc:creator><pubDate>Tue, 09 Dec 2008 17:09:17 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4253799</link><description>What program were you using the first time that caused the problem?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Mon, 08 Dec 2008 13:45:39 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4253239</link><description>Okay, I actually tried zipping using a different program here on my work machine and it seems to have gone through.  Of course I thought that last night when I sent it and it bounced back....</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">burnetla</dc:creator><pubDate>Mon, 08 Dec 2008 13:16:04 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4252615</link><description>No, I removed that.  Over the past two weeks when I have been sending just the contents of the "controllers" directory back and forth from home/work it wouldn't allow me to send it via zip either.  I had to use ".7z" to get it to go.  I assume it must be flagging ".rb" files as executable because I have literally tried deleting everything.  It definitely wasn't a problem with the last assignment though which is why I am even more confused.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">burnetla</dc:creator><pubDate>Mon, 08 Dec 2008 12:42:17 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4252495</link><description>Do you have the PKZIPC.exe file in your bin/ directory?
&lt;br&gt;
&lt;br&gt;In several posts since the beginning of the course, I have said: Remove that file.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Mon, 08 Dec 2008 12:35:34 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4252461</link><description>Am I the only person that is having huge problems submitting my final zip file via gmail?  It seems to be flagging all ruby code as executables and I definitely don't have any exe files in there.  I already contacted Harlan to let him know I was having problems but just wanted to see if anyone had similar issues.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">burnetla</dc:creator><pubDate>Mon, 08 Dec 2008 12:33:46 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4244489</link><description>Sounds good, thank you. I couldn't find the "redirect" code, thought it should have been in users_controller.rb, so i re-implemented it there. I'll put it in my readme. Just got off an airplane, too tired to keep searching!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rajatbaner</dc:creator><pubDate>Mon, 08 Dec 2008 00:49:50 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4244268</link><description>We just want to make sure that your migrations will work -- in all likelihood we won't run them, but sometimes people submit applications that have big problems so it is good to have to the code to reproduce the database.
&lt;br&gt;
&lt;br&gt;There are no required changes to the migrations as long as you use the ones we handed out after Milestone 1.
&lt;br&gt;
&lt;br&gt;Regarding using the cookie to login and to to the last observation set: That is all handled by the filter in the application.rb we originally handed out.
&lt;br&gt;
&lt;br&gt;The only thing you have to do his this: "When an observation set is displayed or edited, the current observation set id is copied to the current user’s attribute current_observation_set_id. You must do this as well. This allows the filter on the application controller to bring the user back to the last observation set edited, for easy addition of new data." See above. This has always been in the requirements.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Mon, 08 Dec 2008 00:27:33 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4243628</link><description>Hi,
&lt;br&gt;I thought I was done.. Logged back in to do a final wrap up, and now I'm confused. Do we need to submit migrations? The Paragraph at the top regarding logging in from a cookie, redirecting to measurements page, makes it sound like we might need to change our migrations. I did them for Milestone 1 but haven't touched them and have been using the provided migrations from this site.
&lt;br&gt;
&lt;br&gt;Am i right? Were we supposed to do a version 3 of the migrations?
&lt;br&gt;Thank you.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rajatbaner</dc:creator><pubDate>Mon, 08 Dec 2008 00:14:24 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4242951</link><description>I revised the tests for the code handed out after Milestone I -- you don't have to do anything extra. They are *NOT* comprehensive. Your submission will be checked by hand. OK?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Mon, 08 Dec 2008 00:02:36 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4242481</link><description>Hi, I've got a couple questions about the tests. How comprehensive are the tests in test/unit? Are we expected or required to add tests to test/functional? And finally, is there an automagic test script for this assignment? I tried rake test and it says everything is great! Granted half the files it ran were just asserting truth.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">racetrack</dc:creator><pubDate>Sun, 07 Dec 2008 23:15:24 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4241790</link><description>John,
&lt;br&gt;After I  run 
&lt;br&gt;rake db:migrate VERSION=02    
&lt;br&gt;rake db:migrate  
&lt;br&gt;and I received the following error message. I am not sure why? What do I need to do?
&lt;br&gt;ActiveRecord::RecordNotFound in WelcomeController#welcome 
&lt;br&gt;Couldn't find User with ID=7
&lt;br&gt;RAILS_ROOT: C:/Ruzh/Harvard/CSCI E-168/Assignment3
&lt;br&gt;
&lt;br&gt;Application Trace | Framework Trace | Full Trace 
&lt;br&gt;C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1383:in `find_one'
&lt;br&gt;C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1366:in `find_from_ids'
&lt;br&gt;C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:541:in `find'
&lt;br&gt;app/controllers/application.rb:31:in `authorize'
&lt;br&gt;
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">student</dc:creator><pubDate>Sun, 07 Dec 2008 22:12:09 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4241608</link><description>Its working now, nevermind =)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Li Diaz</dc:creator><pubDate>Sun, 07 Dec 2008 21:57:24 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4241568</link><description>Apparently, 'admin' cannot view Observation Sets . I can see it now.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sun, 07 Dec 2008 21:53:58 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4241551</link><description>I have everything working, except i cant figure why my rollups arent displaying anything, except blank rows. Is there something i should be looking at that im missing? I noticed i keep getting one day ahead in the from -to date range on the rollup page, however , even by changing this or the interval i keep getting : "There's no data for that rollup" or timestamped rows with empty rows.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Li Diaz</dc:creator><pubDate>Sun, 07 Dec 2008 21:52:13 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4240851</link><description>Right.
&lt;br&gt;
&lt;br&gt;Naturally, I've been watching this discussion of datetime_select with some interest.
&lt;br&gt;
&lt;br&gt;My main comment for students struggling with datetime_select is to look at example code:
&lt;br&gt;
&lt;br&gt;In the ChildCare Co-Op app, app/views/playdates/list.html.erb . . . and app/controllers/playdates_controller.rb (see the "create" action).
&lt;br&gt;
&lt;br&gt;As you see there, datetime_select does all of the heavy leifting -- you don't have to dig into the key of the instance object, nor its pieces.
&lt;br&gt;
&lt;br&gt;The one additional piece here is that there is an option :include_seconds which is documented for other tags; despite its omission from the docs for datetime_select, it does exist. I sent around an e-mail on this topic awhile back.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Sun, 07 Dec 2008 21:06:30 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4240783</link><description>My point, as I noted below, is that you cannot access params[:observation][:observed_at].  Rails is smart, but not that smart -- those parameters are unpacked by ActiveRecord.  There is no key :observed_at in the params hash in the controller -- dump the hash in the console and try accessing it!  It will give you a nil.  You're right in that you don't want to mess with these multi-part data types in the controller, but what I originally said was incorrect about how to access it if so inclined.
&lt;br&gt;
&lt;br&gt;As I said, generally, you want to build your forms so you can do as you described, and mess with parameters only on rare occasions.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Keith</dc:creator><pubDate>Sun, 07 Dec 2008 20:57:53 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4240611</link><description>As of 7:38 PM EST - no problems from my computer. Try clearing your cookies for the &lt;a href="http://metricsmine.plugh.org" rel="nofollow"&gt;metricsmine.plugh.org&lt;/a&gt; host.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Sun, 07 Dec 2008 20:38:37 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4240455</link><description>WebMaster WebMaster , where are you?
&lt;br&gt;
&lt;br&gt;&lt;a href="http://metricsmine.plugh.org/observation_sets" rel="nofollow"&gt;http://metricsmine.plugh.org/o...&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;We're sorry, but something went wrong.
&lt;br&gt;We've been notified about this issue and we'll take a look at it shortly.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sun, 07 Dec 2008 20:20:01 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4240020</link><description>Observation.new() should create a new Observation object, right?  So the params hash that you pass to new() should be a set of attributes of that object, i.e. in this case, attributes of the Observation class.  params[:observation] is an appropriate such hash, but params[:observation][:observed_at] is just the parameters for the observed_at field,  You might be able to get away with something like
&lt;br&gt;
&lt;br&gt; observation = Observation.new()
&lt;br&gt; observation.observed_at = Time.new(params[:observation][:observed_at])
&lt;br&gt;
&lt;br&gt;but why go to the trouble of addressing this level of detail when creating your observation?
&lt;br&gt;You have everything you need in params[:observation] -- the observation_set_id, notes, amount, and all of the pieces of observed_at.
&lt;br&gt;Just invoke Observation.new(params[:observation]), and trust Rails to unpack everything properly for you.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Morris</dc:creator><pubDate>Sun, 07 Dec 2008 19:24:47 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4239573</link><description>It has never been down. It has failed to render a page because people keep deleting the observation kinds! Sheesh!!
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Sun, 07 Dec 2008 18:23:36 -0000</pubDate></item><item><title>Re: Assignment 3, Milestone III</title><link>http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/#comment-4237871</link><description>At present, once a unit is created, you can only change its name.
&lt;br&gt;
&lt;br&gt;Also, when an observation is created, the unit should be the same as the preferred unit as the observation set for which it is created. This is specified in the assignment: "An Observation has a Unit. In the initial implementation, all Observations in a particular Observation Set use the Observation Set’s preferred unit. (E.g., if the Observation Set’s preferred unit is Pound, then all Observations are also in Pounds.)" (&lt;a href="http://e168f08.plugh.org/assignments/assignment-3-2/)" rel="nofollow"&gt;http://e168f08.plugh.org/assig...&lt;/a&gt;.
&lt;br&gt;
&lt;br&gt;Eventually, it would be nice if one observation could be recorded in pounds, and then later in kilograms, with automatic conversions between units of the same measurement kind.
&lt;br&gt;
&lt;br&gt;Also, at present, when you create an observation set, you never pick the unit. You only pick the KIND, and, by specification, "also set the @observation_set’s preferred unit to the first unit of the selected ObservationKind’s Measurement!!" (&lt;a href="http://e168f08.plugh.org/assignments/assignment-3-milestone-iii/)" rel="nofollow"&gt;http://e168f08.plugh.org/assig...&lt;/a&gt;. Notice that we have not defined here what "first" really means; as long as you set the observation_set's unit to SOME unit that has been associated with the measurement of the picked observation kind, you'll satisfy the requirement. I probably should have said "first in order of create time." In any case, lacking an ability to convert between units of the same measurement, it makes no sense to allow a lot of flexibility with units.
&lt;br&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jgn</dc:creator><pubDate>Sun, 07 Dec 2008 15:05:58 -0000</pubDate></item></channel></rss>
