<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>e168f08 - Latest Comments in Final Project: Tips for the Writeup and Features</title><link>http://e168f08.disqus.com/</link><description></description><language>en</language><lastBuildDate>Fri, 27 Feb 2009 11:24:46 -0000</lastBuildDate><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-6702669</link><description>Hi,&lt;br&gt;I know the course is long over, and no-one may read this.&lt;br&gt;&lt;br&gt;Is there anyway to compile my ruby code into some sort of Bytecode that can't be read / modified / stolen? Like a Java .class file. &lt;br&gt;&lt;br&gt;I'm getting a web designer to spice up my final project site (&lt;a href="http://www.movie-cat.tv" rel="nofollow"&gt;www.movie-cat.tv&lt;/a&gt;) and want to protect my code. I know how I could do this with the filesystem protections on Linux on my web server, but don't necessarily want him working on my live server.&lt;br&gt;Thanks,&lt;br&gt;Raj</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rqbanerjee</dc:creator><pubDate>Fri, 27 Feb 2009 11:24:46 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5451808</link><description>About the writeup -- this very page is the extra info on the writeup.&lt;br&gt;&lt;br&gt;Length: You have to explain how your app is designed, how it works, and how it needs to be maintained. Imagine a document that would describe such things for an app of similar complexity not written by you. It strikes me that it is hard to imagine that it would be fewer than 4 pages, but everyone writes with different degrees of concentration and pithyness.&lt;br&gt;&lt;br&gt;Your TA is not going to be able to grade two projects. You are going to have to submit one ZIP that represents what you want to have graded.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Wed, 21 Jan 2009 20:01:42 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5449660</link><description>In the final project description there is a hint at more information on the write up. Is this available somewhere? If not is it OK to ask how long this write up should be? Another question - I have reached a certain working point in my application . If I proceed to implement another feature, I'll break the functionality. If I have not finished by the end of the day, may I submit 2 ZIP files, 1 working - 1 work-in-progress ? I wish there was a single posting forum - I just discovered this thread today.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 21 Jan 2009 18:38:01 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5255281</link><description>Thanks John.. I  always do the same mistake.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">na</dc:creator><pubDate>Sat, 17 Jan 2009 23:49:15 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5252734</link><description>As I showed in every single app creation demo, you must delete public/index.html (or rename it). Otherwise, this static file will be picked ahead of your controllers, etc.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Sat, 17 Jan 2009 20:38:20 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5252558</link><description>Hi,&lt;br&gt;&lt;br&gt;In my app when i type  &lt;a href="http://localhost:3000/" rel="nofollow"&gt;http://localhost:3000/&lt;/a&gt; and I get "Welcome aboard: You're riding the Rails!" I have the following line in routes.rb file in config directory. It is the first line.&lt;br&gt;&lt;br&gt;map.connect '', :controller =&amp;gt; 'welcome', :action =&amp;gt; 'welcome'&lt;br&gt;&lt;br&gt;If i type &lt;a href="http://localhost:3000/welcome/welcome" rel="nofollow"&gt;http://localhost:3000/welcome/welcome&lt;/a&gt;, everything works fine. It displays the main page. What is going on. I am confused.&lt;br&gt;&lt;br&gt;Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">na</dc:creator><pubDate>Sat, 17 Jan 2009 20:23:59 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5151938</link><description>Thanks. That was a dumb mistake.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rqbanerjee</dc:creator><pubDate>Thu, 15 Jan 2009 16:33:00 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5150713</link><description>Don't use the name "new" for a named scope -- you don't want to override the normal object initialization do you?&lt;br&gt;&lt;br&gt;So for:&lt;br&gt;&lt;br&gt;named_scope :new, :order =&amp;gt; "name", :conditions =&amp;gt; "url = 'recentlyadded'"&lt;br&gt;&lt;br&gt;Call it:&lt;br&gt;&lt;br&gt;named_scope :recently_added, :order =&amp;gt; "name", :conditions =&amp;gt; "url = 'recentlyadded'"</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Thu, 15 Jan 2009 16:07:27 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5150361</link><description>Hi,&lt;br&gt;Harlan taught me how to use named_scope last night in the clinic, but its causing some issues. Couldn't find anything useful about it on the interwebs.&lt;br&gt;Here are my named scopes for my "Movies" class:&lt;br&gt;named_scope :all, :order =&amp;gt; "name"&lt;br&gt;named_scope :rated, :order =&amp;gt; "name", :conditions =&amp;gt;  "rating &amp;gt; 0"&lt;br&gt;named_scope :new, :order =&amp;gt; "name", :conditions =&amp;gt; "url = 'recentlyadded'"&lt;br&gt;&lt;br&gt;plus a few more...&lt;br&gt;Now, in my other classes, when I try to do this:&lt;br&gt;temp = Movie.find_by_name(newname)&lt;br&gt;		if (!temp || !temp.year) &lt;br&gt;			puts "LOOKED UP " + newname + " AND DECIDED TO SAVE"&lt;br&gt;			mov = Movie.new		&lt;br&gt;			mov.name = newname&lt;br&gt;			mov.rating = 0&lt;br&gt;.....&lt;br&gt;I get:&lt;br&gt;undefined method `name=' for #&amp;lt;Class:0x81cf34c&amp;gt;&lt;br&gt;C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1672:in `method_missing'&lt;br&gt;C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/named_scope.rb:158:in `send'&lt;br&gt;C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/named_scope.rb:158:in `method_missing'&lt;br&gt;C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:1857:in `with_scope'&lt;br&gt;(__DELEGATION__):2:in `__send__'&lt;br&gt;(__DELEGATION__):2:in `with_scope'&lt;br&gt;app/controllers/scrapers_controller.rb:79:in `scrape_comcast'&lt;br&gt;&lt;br&gt;Why is Scope coming into play here? I'm not using it in this particular class. does "scope" stick around in some way?&lt;br&gt;(i also changed the first line to "temp = Movie.all.find.....)" to no avail.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rqbanerjee</dc:creator><pubDate>Thu, 15 Jan 2009 15:51:25 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5092401</link><description>Sorry, wires crossed.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Tue, 13 Jan 2009 10:32:08 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5092254</link><description>Actually, it would be /assignments/1/edit, as akv posted :)  ':controller/:action/:id' is the default routing, not a RESTful route.&lt;br&gt;&lt;br&gt;So yes, you should use map.resources :assignments, and it will give you urls in the format you posted, which are the standard RESTful Rails routes.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kmorrison</dc:creator><pubDate>Tue, 13 Jan 2009 10:22:41 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5092068</link><description>ActionController::Routing::Routes.draw do |map|&lt;br&gt;    map.connect '', :controller =&amp;gt; 'welcome', :action =&amp;gt; 'index'&lt;br&gt;    map.logout '/logout', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'destroy'  &lt;br&gt;    map.login '/login', :controller =&amp;gt; 'sessions', :action =&amp;gt; 'new'  &lt;br&gt;    map.register '/register', :controller =&amp;gt; 'users', :action =&amp;gt; 'create'  &lt;br&gt;    map.signup '/signup', :controller =&amp;gt; 'users', :action =&amp;gt; 'new'  &lt;br&gt;    map.activate '/activate/:activation_code', :controller =&amp;gt; 'users', :action =&amp;gt; 'activate', :activation_code =&amp;gt; nil  &lt;br&gt;    map.resources :users, :member =&amp;gt; { :suspend =&amp;gt; :put, :unsuspend =&amp;gt; :put, :purge =&amp;gt; :delete }   &lt;br&gt;    map.resource :session  &lt;br&gt;    &lt;br&gt;    #atom feed related config&lt;br&gt;    map.resources :assignments&lt;br&gt;    map.root :controller =&amp;gt; :assignments&lt;br&gt;&lt;br&gt;  &lt;br&gt;  map.connect ':controller/:action/:id'&lt;br&gt;  map.connect ':controller/:action/:id.:format'&lt;br&gt;end</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akv</dc:creator><pubDate>Tue, 13 Jan 2009 10:07:11 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5091455</link><description>map.resources :assignments should result in the link_to helper generating links in the "RESTful" for (/assignments/edit/1).&lt;br&gt;&lt;br&gt;As I said before, paste in your entire routes.rb file.&lt;br&gt;&lt;br&gt;If you go back through the lectures, I demo'd adding an Atom feed with a RESTful controller.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Tue, 13 Jan 2009 09:03:32 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5091370</link><description>y, i took that out and it's working for the edit but do I need the map resources :assignments for the atom feed?  I was following an example on the ruby on rails site and it said to add it there.  Also, why does it it cause problems if it is in the map.resources?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akv</dc:creator><pubDate>Tue, 13 Jan 2009 08:56:05 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5091339</link><description>That should work. Paste in your entire routes.rb file (but take out the comments).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Tue, 13 Jan 2009 08:51:30 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5091316</link><description>Yes, I was trying to get an atom feed going off that page, so i added it.  Is that not allowed?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akv</dc:creator><pubDate>Tue, 13 Jan 2009 08:47:45 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5087204</link><description>Did you use map.resources :assignments in your routes.rb file?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kmorrison</dc:creator><pubDate>Tue, 13 Jan 2009 00:01:57 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5086597</link><description>Sorry the html got rendered, the link shows up as&lt;br&gt;I expect the link to be&lt;br&gt;&lt;br&gt;href="/assignments/edit/1"&amp;gt;(edit)&lt;br&gt;&lt;br&gt;but it gets rendered as&lt;br&gt;&lt;br&gt; href="/assignments/1/edit"&amp;gt;(edit)&lt;br&gt;&lt;br&gt;Any ideas?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akv</dc:creator><pubDate>Mon, 12 Jan 2009 23:16:29 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5086555</link><description>Hi,&lt;br&gt;&lt;br&gt;I am running into something strange with a link, I have the following code in my one of my views&lt;br&gt;&lt;br&gt;&amp;lt;td&amp;gt;&amp;lt;%= assign.name %&amp;gt; &amp;lt;%= link_to '(edit)', :action =&amp;gt; "edit", :id =&amp;gt; assign.id %&amp;gt;  &amp;lt;/td&amp;gt;&lt;br&gt;&lt;br&gt;I expect link to be &lt;a href="/assignments/edit/1" rel="nofollow"&gt;(edit)&lt;/a&gt;&lt;br&gt;&lt;br&gt;but it keeps rendering as &lt;a href="/assignments/1/edit" rel="nofollow"&gt;(edit)&lt;/a&gt;&lt;br&gt;&lt;br&gt;It is the action and id are reversed for some reason?  Has anyone ever seen this?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">akv</dc:creator><pubDate>Mon, 12 Jan 2009 23:13:46 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5071712</link><description>"Where is Ruby taking me?"&lt;br&gt;&lt;br&gt;I am suddenly aware of a very different kind of technology around me. My project has a plethora of complex database table relationships, and yet I have not written a single line of SQL, nor do I plan to. My paramount (read "only") concern has been to architect the perfect set of related Objects (tables), and then Ruby (actually Rails) enables my journey from there.&lt;br&gt;&lt;br&gt;Is this what is meant by the phrase "a pure object oriented language"?&lt;br&gt;&lt;br&gt;Is there any other language or web environment that even comes close to enabling this extreme "crystalline structure"?&lt;br&gt;&lt;br&gt;As a follow-on question, "What would / will be the situations where I will write SQL in a RoR project? &lt;br&gt; - to optimize the load time of a GET page that displays a very large set of data? So if Rails was looping over a group of thousands of individual SQL "select" statements, then I might need to write a single query to pull the same data?&lt;br&gt; - to prevent a similar looping over a large number of PUT "updates"? So if I had to change an index across a large number of records (although, in my experience, this type of thing is usually done as a one-off administrative task directly in an Enterprise Manager interface)?&lt;br&gt; - what other times will I write SQL?&lt;br&gt;&lt;br&gt;I am struck by something one of the Expert Panelists said at John Harvard's (can't remember which one, due to the blur or beer). I have spent the past twelve years of my life coding complex data-driven sites in ColdFusion. The Panelist said "I can't imagine having to maintain someone else's ColdFusion code for such a site." Indeed there is no crystalline structure (other than the cumbersome "Fusebox" system) where all the logic is laid out intuitively as in RoR. &lt;br&gt;&lt;br&gt;Where *else* is this taking me that I cannot even envision yet?&lt;br&gt;This is a totally different way of thinking...&lt;br&gt;&lt;br&gt;Josh</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">swithin</dc:creator><pubDate>Mon, 12 Jan 2009 08:55:32 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5051182</link><description>Thank you, Jody. Yes, I ran up against that, but did not have to do "mortal combat" with it. I just put the ".to_i" extension on the value of the variable that I set. &lt;br&gt;&lt;br&gt;Thank you for following up though. Your help is appreciated!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">swithin</dc:creator><pubDate>Sat, 10 Jan 2009 21:57:51 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5050508</link><description>Make sure to discuss the use of custom components with your TA . . .</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">xertroyt</dc:creator><pubDate>Sat, 10 Jan 2009 20:40:57 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5049903</link><description>Just one more thing you might want to look at.  I ran into problems with a custom control expecting my to convert my param to a string and I was passing in the integer value.  Probably not your issue but just in case.&lt;br&gt;&lt;br&gt;Jody</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jody</dc:creator><pubDate>Sat, 10 Jan 2009 19:33:16 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5048720</link><description>I apologize that I did not give you all the information you needed to help me on my issue. I am not using the standard "collection_select" to generate this pull-down, but rather a custom addon "tree_select" tag that I installed. It sits in the form_for as follows:&lt;br&gt;&amp;lt;% form_for(@category) do |f| %&amp;gt;&lt;br&gt;    &amp;lt;%= tree_select(Category.find(:all, :conditions =&amp;gt; "parent_id = 1"), 'category', 'parent_id', @category&amp;gt;&lt;br&gt;&amp;lt;% end %&amp;gt;&lt;br&gt;The code loads, complete with the tree select menu, but did not preselect the item from the menu. &lt;br&gt;&lt;br&gt;Per Jody's comment I got the parameter to display on the page, outside of the "tree_select" tag. So that test worked, but I just could not figure out how to assign it into th "tree_select" tag variables. But at least I had a "toe hold"... thank you.&lt;br&gt;&lt;br&gt;So I hacked into the "application_helper.rb" template, and found the following code that is supposed to apply the wanted 'selected="selected"' parameter to the pull-down menu option:&lt;br&gt;    html &amp;lt;&amp;lt; ' selected="selected"' if cat.id == selected.id&lt;br&gt;I am not sure where that "selected.id" variable is coming from. However, it was not being activated in this "action=new" scenario (probably it is only activated in the "action=edit"), so I just added a second line right after it referring to my "@parent_id" variable (which I defined in the "new" method of "categories_controller.rb" as equal to the incoming "parent_id" URL parameter). So there are two lines right next to each other as:&lt;br&gt;    html &amp;lt;&amp;lt; ' selected="selected"' if cat.id == selected.id&lt;br&gt;    html &amp;lt;&amp;lt; ' selected="selected"' if cat.id == @parent_id&lt;br&gt;This seems to work for now, for both the "action=new" and "action=edit" scenarios. &lt;br&gt;&lt;br&gt;However on Wednesday, maybe I can get a little help refining... figuring out how such custom addon tags should ideally be configured. I would like to review how I have implemented a few different "tree" functions.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">swithin</dc:creator><pubDate>Sat, 10 Jan 2009 17:37:50 -0000</pubDate></item><item><title>Re: Final Project: Tips for the Writeup and Features</title><link>http://e168f08.plugh.org/assignments/final-project-tips-for-the-writeup-and-features/#comment-5047889</link><description>Have you tried just printing the variable out on the screen in the view to make sure it's getting through?  If it is, then the professors option is a great one.  Another thing you might want to read is the prototype javascript section in the book.  I found that prototype was great to easily set a default in any field on your page.  It requires javascript though.&lt;br&gt;&lt;br&gt;Jody</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jody</dc:creator><pubDate>Sat, 10 Jan 2009 16:18:19 -0000</pubDate></item></channel></rss>