SaaS Book Errata versions <0.10.2
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
ABCDEFGHJKLMNOPQR
1
Timestamp SectionVersion (print edition) Page # (print edition)Version (≥ 0.8.5)Location # (kindle edition)Original TextProposed ChangeReasonFixed in Version
2
2/20/2012 8:09:281192We conclude with a tour of the remainder the book.We conclude with a tour of the remainder of the book.Grammar0.8.4
3
2/26/2012 8:44:001.10.8.435Given the several chapters above to gain experience with Ruby and Rails basis,...Given the several chapters above to gain experience with Ruby and Rails basics,...The original word 'basis' does not make sense in the context.0.8.5
4
2/18/2012 9:37:391.120.8.1761SaaS on Cloud Computing is synergistic..., such Model View ControllerSaaS on Cloud Computing is synergistic..., such as Model View ControllerGrammar0.8.5
5
3/8/2012 13:57:411.120.8.438"...the main reason we wrote this book is help more people become aware...""...the main reason we wrote this book is to help more people become aware..."
change is to add 'to' between is and help
grammatical error0.8.5
6
3/10/2012 21:16:431.20.8.4In the following chapters, we show both examples of both beautiful code and legacy code...In the following chapters, we show examples of both beautiful code and legacy code...redundancy0.8.5
7
2/25/2012 18:53:571.30.8.4260"BDUF)" links to http://en.wikipedia.org/wiki/BDUF)"BDUF" should link to http://en.wikipedia.org/wiki/BDUFThe trailing closing paren breaks the link.0.8.5
8
2/26/2012 10:46:361.30.8.4284Test-Driven Development (TDD)

links to http://en.wikipedia.org/wiki/Test-Driven_Development_(TDD)
should link to http://en.wikipedia.org/wiki/Test-driven_developmentOriginal url does not link to a valid Wikipedia entry; correct url provided0.8.5
9
1/28/2012 20:31:391.40.8.1308module testing?Wikipedia article for module_testing doesn't exist.0.8.4
10
1/25/2012 12:26:201.40.8.1348"we are ready to how we make developers more productive""we are ready to see how they make developers more productive
missing word0.8.4
11
3/11/2012 4:47:211.50.8.44and the hence changes are greaterand hence chances are greater (...)
or
hence chances are greater (...)
mistake.0.8.5
12
3/2/2012 8:30:191.50.8.5377Examples are reflection, which allow programs to observe themselves, and metaprogramming, which allows programs to modify their own structure and behaviour at runtime.Examples are reflection, which allows programs to modify their own structure and behaviour at runtime, and metaprogramming, which allows programs to modify their own structure and behaviour at compile time.The definitions presented doesn't reflect the ones described on wikipedia links provide in the book.not a bug - our usage of these terms is correct
13
1/24/2012 13:55:341.50.8.1392http://en.wikipedia.org/wiki/Bit_Blithttp://en.wikipedia.org/wiki/Bit_blitBitBlit hyperlink points to incorrect URL, wikipedia complains there is no article with this name0.8.4
14
3/3/2012 21:00:401.50.8.4392 The third productivity mechanism is to re-use portions from past designs rather that write everything from scratch.
The third productivity mechanism is to re-use portions from past designs rather than write everything from scratch.I believe that the word "than" is what you intended to use.0.8.5
15
3/3/2012 21:06:121.50.8.4392(We highlight examples that improve productivity by via reuse with this “Reuse” recycling icon.)

(We highlight examples that improve productivity via reuse with this “Reuse” recycling icon.)by and via mean approximately the same and you should use only one of the two or another word altogether.duplicate entry
16
2/26/2012 8:43:401.50.8.4399... re-use portions from past designs rather that write everything...... re-use portions from past designs rather than write everything...Typo. that => than0.8.5
17
1/28/2012 5:34:081.50.8.1415but there also more subtlebut there are also more subtlegrammar0.8.4
18
3/6/2012 20:33:421.50.8.4419Examples for lay people include word processors to simplify typing and editing, spreadsheets for make accounting easier, and email to make exchanging messages much lower overhead than letters.Examples for lay people include word processors to make typing and editing simpler, spreadsheets to make accounting easier, and email to make exchanging messages much lower overhead than letters.-Parallelizes sentence structure while correcting "for make" grammatical error.0.8.5
19
2/21/2012 8:14:541.50.8.4423spreadsheets for make accounting easierspreadsheets to make accounting easiergrammatical error0.8.5
20
1/25/2012 12:30:151.50.8.1444Self Check 1.5.1 - Which mechanism does is the weakest argument for...Self Check 1.5.1 - Which mechanism is the weakest argument for...extra word "does"0.8.4
21
2/23/2012 6:11:561.50.8.4(We highlight examples that improve productivity by via reuse with this "Reuse" recycling icon.)(We highlight examples that improve productivity by reuse with this "Reuse" recycling icon.)Redundant words "by via".0.8.5
22
2/23/2012 9:18:481.50.8.4Returning to a development lifecycles,Returning to development lifecycles,Grammatical error0.8.5
23
1.5, 1.6, 3.70.8.1http://en.wikipedia.org/wiki/mix-inshttp://en.wikipedia.org/wiki/MixinThe Wikipedia page "Mix-in" is about ice cream.0.8.4
24
2/16/2012 16:01:161.60.8.4468When a data is large and/or updated frequentlyWhen data are large and/or updated frequentlydata' is a plural word0.8.5
25
2/22/2012 3:33:381.60.8.4498Useful addition features that help productivity via reuse include mix-ins, which collects related behaviors and makes it easy to add them to many different classes,Useful additional features that help productivity via reuse include mix-ins, which collect related behaviors and make it easy to add them to many different classes,Two fixes: "addition" should be "additional"; subject/verb agreement, "mix-ins ... collects ... makes" should be "mix-ins ... collect ... make"0.8.5
26
2/10/2012 16:47:011.60.8.1498Closures link refers to wikipedia disambiguation page rather than cloßures, computer science page.Now linked to http://en.wikipedia.org/wiki/Closure_(computer_science)Fix link0.8.5
27
3/10/2012 16:26:061.60.8.4504Which of the following examples of SaaS examples from Google is the best match to the six arguments given above: Search, Maps, News, Gmail, Calendar, YouTube, and Documents.Which of the following SaaS offerings from Google best exemplifies each of the six advantages of SaaS above? You may list more than one software per item. Search, Maps, Gmail, Calendar, YouTube, and Documents.

No user installation: Documents, all.
Can’t lose data: Gmail, Calendar.
Users cooperating: Documents.
Large/Changing datasets: Search, Maps, and YouTube.
Software centralized in single environment: Search, all.
No field upgrades when updating app: Documents, all.
The wording of this question is unclear; it sounds like you are asking to pick *one* SaaS that best matches *all six* of the SaaS features. It is not clear that you want us to pick one example for *each* of the six features. I was thinking Gmail was probably the one that would fit all six best.

Also, the word "arguments" is unclear, and you've incorrectly used the word "examples" twice in the same sentence.

I also took out Google News and added an "all" option.
duplicate entry
28
2/16/2012 8:38:581.60.8.4505Probably the best-known SaaS using Rails is Twitter, which was invented in 2006 and grew from 20,000 tweets per day in 2007 to 200,000,000 in 2011.

Patterson, David; Fox, Armando (2012-01-12). Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing, Alpha Edition (Kindle Locations 504-505). Strawberry Canyon LLC. Kindle Edition.
I dont think Twitter is on Ruby on Rails, there was a change in 2008/2009 and another recent one.
http://www.artima.com/scalazine/articles/twitter_on_scala.html
http://engineering.twitter.com/2011/04/twitter-search-is-now-3x-faster_1656.html
0.8.5
29
2/24/2012 20:56:241.60.8.426Which of the following examples of SaaS examples from Google is the best match to the six arguments given above: Search, Maps, News, Gmail, Calendar, YouTube, and Documents.Match each of the six arguments given above to one or more of the following examples of SaaS from Google: Search, Maps, News, Gmail, Calendar, Youtube, and Documents.The original wording is somewhat ambiguous. I didn't realize the intent was to match _each_ argument with an example until I read the answer.duplicate entry
30
2/16/2012 14:11:131.6.2 Self-Check0.8.4513Self-Check 1.6.1 Which of the following examples of SaaS examples from Google is the best match to the six arguments given above: Search, Maps, News, Gmail, Calendar, YouTube, and Documents.
Self-Check 1.6.1 Which of the following examples of SaaS from Google is the best match to the six arguments given above: Search, Maps, News, Gmail, Calendar, YouTube, and Documents.
Duplicated word.0.8.5
31
1/28/2012 20:33:171.70.8.1557thruthroughSpelling0.8.4
32
2/27/2012 15:44:521.90.8.4650...the amount of communication increases, which can reduce the time to available for people to get their work done...the amount of communication increases, which can reduce the time available for people to get their work doneto' has nothing to do in that phrase in that place0.8.5
33
11.10.8.44852Each pair of jewels form synergistic boundsEach pair of jewels forms synergistic bondsgrammar, typos0.8.5
34
2/23/2012 12:59:442.10.8.4862...making requests of the server on the user's behalf......making requests to the server on the user's behalf...grammar0.8.5
35
2/1/2012 12:41:062.10.8.044in self-check 2.1.2 What element(s) in Figure 2.1 ...What element(s) in Figure 2.2Figure 2.2 matches the answer, and figure 2.1 is just a text box0.8.4
36
2/24/2012 9:54:582.110.8.41451http://martinfowler.coma/eaaCatalog/http://martinfowler.com/eaaCatalog/There's a typo in the url to Martin Fowler's site: .coma should obviously be .com0.8.5
37
2/25/2012 7:33:562.110.8.41451http://martinfowler.coma/eaaCatalog/http://martinfowler.com/eaaCatalog/There's a typo in the url to Martin Fowler's site: .coma should obviously be .comduplicate entry
38
3/1/2012 19:55:382.11 To Learn More0.8.41447URL http://martinfowler.coma/ eaaCatalog/.
URL http://martinfowler.com/eaaCatalog/.Typo. (a after .com)duplicate entry
39
2/29/2012 1:45:082.120.8.41459ASCII codes using Ruby.
...
You can print the hex equivalents with ?%.to_s(16)
ASCII codes using Ruby.
...
You can print the hex equivalents with ?%.ord
?%.to_s(16) - won't work on ruby 1.9 - wrong number of arguments.
http://stackoverflow.com/questions/1270209/getting-an-ascii-character-code-in-ruby-fails
duplicate entry
40
2/26/2012 16:21:412.120.8.41460 ( for me, but varies, right?)You can print the hex equivalents with ?%.to_s(16)You can print the hex equivalents with ?%.ord.to_s(16)Changes in ruby syntax in the version provided with the bookware vm (not sure what version I have)duplicate entry
41
2/25/2012 14:06:492.120.8.4?%.to_s(16)?%.ord.to_s(16)A change in Ruby 1.9: http://stackoverflow.com/questions/1270209/getting-an-ascii-character-code-in-ruby-fails0.8.5
42
2/28/2012 10:40:002.2886"each computer has an IP address consisting of four bytes separated"

"each computer has an IP address consisting of four or six bytes separated"I think IP addresses are moving to six bytes, so this should be updated.

http://en.wikipedia.org/wiki/IPv6_address
not a bug - elaboration addresses this
43
1/22/2012 23:15:312.2All46All930In Screencast 2.2.1 Cookies, the version of RottenPotatoes used is slightly different from the version used in the other examples, but this doesn't materially affect the explanation in the screencast.Noted in 0.8.4, but screencast not corrected.
44
2/27/2012 8:27:492.30.8.41045Cascading Style Sheets (CSS) is a markup language describing...Cascading Style Sheets (CSS) is a style sheet language describing...CSS is not a markup language0.8.5
45
2/20/2012 9:21:092.30.8.41053Three possibilities, from most specific to least specific, are: #i span, p.x span, and .x span. p#i span and p#i.x span are redundant since at most one element can have the ID i.Five possibilities, from most specific to least specific, are: p#i.x span, p#i span, #i span, p.x span, and .x span.I'm not sure that it is correct to say that "p#i span and p#i.x span are redundant since at most one element can have the ID i."

p#i span _only_ applies to the span elements that are descendants of the element identified by 'i' IF AND ONLY IF the element is of type 'p' whereas #i span can apply to any span element that is a descendant of ANY element identified by 'i'.

In a sense, the p#i.x span would be the MOST specific CSS selector available since it ONLY applies to span elements that are descendants of the element identified by 'i' IF AND ONLY IF the element is of type 'p' AND the element is of class 'x'.
0.8.5
46
2/24/2012 10:12:312.30.8.41053Three possibilities, from most specific to least specific, are: #i span, p.x span, and .x span. p#i span and p#i.x span are redundant since at most one element can have the ID i.The formatting of this answer is very difficult to read due to use of period both in the answers themselves, and to separate the answers. While the red coloring helps, answers still run into each other and it is difficult to distinguish them.not a bug
47
1/28/2012 20:37:242.50.8.11162Template View (bottom center), used by PHP and Django,Template View (bottom center), used by PHP,Although Django prefers to call itself a Model-Template-View system , it much more closely resembles the MVC architecture than the Template View architecture.0.8.4
48
2/21/2012 7:43:382.6Alpha1223Link to the wikipedia for "Active record Architectural Pattern" is going to invalid wikipedia page. 0.8.5
49
2/16/2012 10:11:062.60.8.41223Link to active record pattern is broken on wikipediahttp://en.wikipedia.org/wiki/Active_record_patternlink is broken, I provided correct link0.8.5
50
3/6/2012 19:13:122.70.8.41270There are a number of errors relating to Figure 2.13. The ones I noticed were:
-> The link pastebin/u/saasbook for Figure 2.13 is clearly wrong. It displays a list of all pastebins for saasbook, not a particular one.
-> The references to lines 6 and lines 3-5 in figure 2.13's caption are wrong.
-> The line numbers in this sentence in the text following fig 2.13 are also wrong.
"every request after the login (line 3) relies on implicit information: line 4 assumes the site “remembers” who the currently-logged-in user is to show him his welcome page, and line 7 assumes the site “remembers” who has been adding items to their cart for checkout."
I have no idea what the correct pastebin link is for figure 2.13
I also am not sure how either the text in fig 2.13 or the line numbers should be updated. But the don't make any sense as they are currently.
"errors of fact" I suppose0.8.5
51
2/27/2012 11:52:322.7Alpha25% (1291/52553)http://pastebin.com/u/saasbook
http://pastebin.com/u/ "SOMETHING"Incorrect link to pastebin code:
http://pastebin.com/u/saasbook

Figure 2.13
0.8.5
52
2/27/2012 15:50:452.7.10.8.41307line 6the table 2.13 has no line 6, I'm guessing the other numbers in that greyed area need to be adjusted or the restful non-restful table needs to be modiffiednot a bug
53
3/3/2012 20:50:172.7.10.8.41294 of 5253The generic URI of http://pastebin.com/u/saasbook is given as oppose to the specific link as provided up to this point.Use specific URIConsistency, as well as i found it difficult to locate the referenced file. 0.8.5
54
2/27/2012 15:52:482.8.2 Self check 0.8.41387Figure 3.13The self check makes references to a table and concepts that belong to chapter 3, not chapter 20.8.5
55
2/27/2012 15:53:372.8.3 Self Check 0.8.41391Figure 3.13The self check makes references to a table and concepts that belong to chapter 3, not chapter 20.8.5
56
2/1/2012 12:36:342.90.8.063in self check 2.83

Why doesn't the helper methods for the Index action take an argument?
Why doesn't the helper method for the Index action take an argument?Subject verb disagreement0.8.4
57
2.x0.8.4Later we allow moviegoers to specify their favorite movies...Later we allow moviegoers to rate their favorite movies...example used in Associations in ch6 doesn't match what we originally said it would be0.8.5
58
2/28/2012 10:22:493alpha section 3While creating myrottenpototoes, some of the listings in the book are not accurate. For example, my db directory is empty right after creations, but once I tweak the gems file and bundle, or after I create the migration file, the db files show up. This is just one example. I'm not sure if you listings are supposed to be exact in terms of where we are in the process of creating the app or a final listing of what should be there when all is done.

FYI - the forum post says to check the errata list before posting by my browser (IE9) isn't displaying any list. So this could be a dup and I don't know it.
Either clearly state the listings are not exact but instead final listings or match the listing to the exact state of the directories. Makes me think either my system has made a mistake or I have.
59
3.1All73(In first bullet of summary) to_stringto_sym0.8.4
60
3.110.8.098"Two arguments: the first is a symbol and the second is a block. We used...""Two arguments: the first is a string and the second is a block. We used..."movies' is not a symbol- it is a string0.8.4
61
3/8/2012 16:14:113.120.8.4 2568The controller code is in class MoviesController, which inherits from ActionController
The controller code is in class MoviesController, which inherits from ApplicationControllerI think ApplicationController is the correct class and views are not wrapped in application.html.haml when ActionController is used.duplicate entry
62
2/18/2012 10:55:053.120.8.42576The controller code is in class MoviesController, which inherits from class ActionController...The controller code is in class MoviesController, which inherits from your class ApplicationController...Without the correction, the "movie" web pages do not include the appropriate application wrapper HTML, with its javascript, css, etc.0.8.5
63
2/18/2012 11:00:133.120.8.42576# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end
# This file is app/controllers/movies_controller.rb
class MoviesController < ApplicationController
def index
@movies = Movie.all
end
end
PLEASE NOTE: This is a correction to an earlier-submitted Errata, where I corrected the totally-missing class MoviesController line by adding a line in which MoviesController inherited from ActionController, which was in agreement with the text. But in fact, MoviesController must inherit from our ApplicationController, so that we pick up the proper wrapper HTML, javascript, css, etc. that it provides.duplicate entry
64
3/8/2012 11:23:323.12Alpha2578extensions include .xml for a file containing XML Builder code (as we saw in Section 3.6, .erb (which we’ll meet shortly) for Rails’ built-in Embedded Ruby renderer, and many others.
extensions include .xml for a file containing XML Builder code (as we saw in Section 3.6), .erb (which we’ll meet shortly) for Rails’ built-in Embedded Ruby renderer, and many others.Typo - missing ")" after Section3.60.8.5
65
3/6/2012 12:37:223.120.8.12586The controller code is in class MoviesController, which inherits from ActionControllerThe controller code is in class MoviesController, which inherits from ApplicationControllerduplicate entry
66
3/1/2012 11:56:383.120.8.42590def index
   @movies = Movie.all  
end
class MoviesController < ApplicationController
def index
@movies = Movie.all
end
end
... in order for rails server to work as intended in this area...duplicate entry
67
3/10/2012 21:00:293.120.8.22592The controller code is in class MoviesController, which inherits from ActionController

Patterson, David; Fox, Armando (2012-01-12). Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing, Alpha Edition (Kindle Locations 2592-2593). Strawberry Canyon LLC. Kindle Edition.
The controller code is in class MoviesController, which inherits from ApplicationControllerMy code only worked with the proposed change and that is based of the example code in rottenpotatoes folderduplicate entry
68
2/15/2012 22:31:003.120.8.42593# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end
# This file is app/controllers/movies_controller.rb
class MoviesController < ActionController::Base
def index
@movies = Movie.all
end
end
The index method (like all of the movies controller methods) must be defined within the MoviesController class.0.8.5
69
2/24/2012 18:16:143.12Alpha2600# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end
class MoviesController < ApplicationController

# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end

end
Perhaps it was properly to be inferred, but the original version as the whole file produced a undefined class message. The latter does fix this problem.duplicate entry
70
2/8/2012 3:01:353.120.8.12602# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end
New pastie: http://pastebin.com/Qg1931d1 Missing class declaration or rather class opening statement in movies_controller.rb

Executing code as is produces error:
LoadError (Expected /home/.../controllers/movies_controller.rb to define MoviesController):

The corresponding code in pastebin has the same problem (http://pastebin.com/A3aj5W42)
0.8.5
71
2/26/2012 4:28:313.120.8.42602# This file is app/controllers/movies_controller.rb
def index
@movies = Movie.all
end
# This file is app/controllers/movies_controller.rb
class MoviesController < ApplicationController
def index
@movies = Movie.all
end
end
The content of code located at http://pastebin.com/A3aj5W42 misses the class declaration.
I think the paragraph assumes that the file "movies_controller.rb" already exists, which is not the case at that stage of the chapter.


Trying to view the page as mentioned in following paragraph shows a Ruby error :

LoadError in MoviesController#index

Expected /home/saasbook/Documents/myrottenpotatoes/app/controllers/movies_controller.rb to define MoviesController

Rails.root: /home/saasbook/Documents/myrottenpotatoes
duplicate entry
72
3/8/2012 19:43:423.120.8.42635If you use your browser's View Source option to look at the generated source, you can see the links generated by link_to have URIs corresponding to the show action of each of the movies.There are no movies in the development database at this point in the chapter. The migration created doesn't load any movies into the database for this part of the chapter to actually see the links generated by the link_to.

This entire section needs a rewrite if the objective is to build up the controller and view.
0.8.5
73
3/9/2012 19:04:233.120.8.42645ELABORATION: Reflection and metaprogramming for conciseness More concisely, if link_to’s second argument is an ActiveRecord model of class Movie, link_to will implicitly call movie_path on it so you don’t have to. So the link_to call could have been written as link_to ”More about #movie.title”, movie.
ELABORATION: Reflection and metaprogramming for conciseness More concisely, if link_to’s second argument is an ActiveRecord model of class Movie, link_to will implicitly call movie_path on it so you don’t have to. So the link_to call could have been written as link_to ”More about #{movie.title}”, movie.Wrong syntax for interpolation of movie.title0.8.5
74
3/5/2012 20:22:163.120.8.42646Information regarding see HTML head element is wrong. At this point, I only see what is in the view file itself, even though I can see the application template. Maybe the coupling isn't hooked up yet at this point in the book? Either discuss hooking up or move to section where it is hooked up.Don't see the intermixing from application template into view results.Not a bug; the code works as described
75
2/18/2012 16:17:423.120.8.42725#notice #warning {
background: rosybrown;
margin: 1em 0;
padding: 4px;
}
#notice, #warning {
background: rosybrown;
margin: 1em 0;
padding: 4px;
}
The stylesheet wants to mean that either an id of #notice or an id of #warning is to use the given style. The comma on the first line is required for both FireFox and Chrome, and probably for other browsers.0.8.5
76
3/6/2012 6:43:123.12Alpha2604-2605The controller code is in class MoviesController, which inherits from ActionController and is defined in app/controllers/movies_controller.rb (note that the model’s class name is pluralized to form the controller file name.)The controller code is in class MoviesController, which inherits from ActionController::Base and is defined in app/controllers/movies_controller.rb (note that the model’s class name is pluralized to form the controller file name.)

Or

The controller code is in class MoviesController, which inherits from ApplicationController and is defined in app/controllers/movies_controller.rb (note that the model’s class name is pluralized to form the controller file name.)
After following the book and creating the files app/controllers/movies_controller.rb and app/views/movies/index.html.haml with the syntax provided via PasteBin the application fails when attempting to access http://localhost:3000/movies/ with the error:
Expected /home/ubuntu/Documents/myrottenpotatoes/app/controllers/movies_controller.rb to define MoviesController

Upon revisiting the book text to see if I had missed anything I came accross the bullet a few lines above that states:
The controller code is in class MoviesController, which inherits from ActionController and is defined in app/controllers/movies_controller.rb (note that the model’s class name is pluralized to form the controller file name.).

I then modified the PasteBin code in my movies_controller.rb to create a class around the provided code and inherit ActionController. Upon doing so the application then returns the errror:
wrong argument type Module (expected Class)

After further research into this error, I found documentation that pointed me to "only the ApplicationController in a Rails application inherits from ActionController::Base. All other controllers in turn inherit from ApplicationController."

Modifying the class to inherit either ApplicationController or ActionController::Base allows the application to be ran successfully.
duplicate entry
77
3/5/2012 20:30:573.120.8.42649, 2674refer to app/views/layouts/application template when you should correctly add file extension to these references. app/views/layouts/application.html.haml templateclarification of which file since you had us delete one file and create only with the extension - keep extension for clarity0.8.5
78
2/6/2012 16:43:213.120.8.0102"The controller code is in MoviesController, which inherits from ActionController...""The controller code is in MoviesController, which inherits from ApplicationController..."It actually inherits from ApplicationController, which mixes-in ActionController. ActionController is a module not a class, so it can't inherit from there.0.8.5
79
2/22/2012 12:56:173.12Alpha104# in app/controllers/movies_controller.rb

def show
id = params[:id] # retrieve movie ID from URI route
@movie = Movie.find(id) # look up movie by unique ID
# will render app/views/movies/show.html.haml by default
end
# in app/controllers/movies_controller.rb

class MoviesController < ApplicationController
def show
id = params[:id] # retrieve movie ID from URI route
@movie = Movie.find(id) # look up movie by unique ID
# will render app/views/movies/show.html.haml by default
end
end
It is missing the class declaration.duplicate entry
80
3/7/2012 3:45:263.130.8.42771when some computation fails returns nil instead of the objectwhen some computation fails and returns nil instead of the objectword missing: "fails returns"0.8.5
81
3/7/2012 18:48:083.130.8.42776version of her operating system, the specific commands she ...version of his operating system, the specific commands he ...

and subsequent mentions of the user.
from the user profile, its a he. 0.8.5
82
3/3/2012 12:20:223.140.8.42603def index
@movies = Movie.all
end
class MoviesController < ApplicationController
def index
@movies = Movie.all
end
end
Causes error in the app
"Expected /home/saasbook/Documents/myrottenpotatoes/app/controllers/movies_controller.rb to define MoviesController"
duplicate entry
83
3.140.8.0111fill-in form in using form tag helpersfill-in form using form tag helpersextra 'in' is extraneous0.8.4
84
3/8/2012 3:49:313.150.8.42897params[’movie’][’-title’],params[’movie’][’title’],In my Kindle viewer (Kindle for Mac), the second array dimension shows up as ['-title'] with a hyphen before "title". When I copy-paste the hyphen is not there, so I assume this is some kind of automatic hyphenation the Kindle software added. Is there a way to suppress that for code?not a bug - issue with Kindle firmware/renderer
85
3/8/2012 4:07:113.150.8.42958this requires adding four lines of codethis requires adding six lines of codedepending on how you count I guess0.8.5
86
3/5/2012 11:30:233.152961-# this goes just inside %body

- if flash[:notice]
#notice.message
%p= flash[:notice]
-elsif flash[:warning]
#notice.warning
%p= flash[:warning]
-# this goes just inside %body

- if flash[:notice]
#notice.message
%p= flash[:notice]
-elsif flash[:warning]
#warning.message
%p= flash[:warning]
As the text says, this will give the div a unique id of #notice or #warning and a common class .message. 0.8.5
87
3/5/2012 11:52:473.152961-# this goes just inside %body

- if flash[:notice]
#notice.message
%p= flash[:notice]
-elsif flash[:warning]
#notice.warning
%p= flash[:warning]
-# this goes just inside %body

- if flash[:notice]
#notice.message
%p= flash[:notice]
-elsif flash[:warning]
#warning.message
%p= flash[:warning]
As the text says, this will give the div a unique id of #notice or #warning and a common class .message. 0.8.5
88
3.150.8.0112Movie.create!(params[:movie])Modify the Movie class to use attr_accessible or some other mass-assignment protection, or at least mention the dangers of using unsanitized input. The code as it stands allows an attacker to set any model's attributes by manipulating the form passed to Movie.create!. Although it makes sense not to introduce the added complexity of securing this form for simplicity's sake when teaching how to use Rails, the security implications should at least be mentioned so that readers to not go around unknowingly writing insecure code.

http://guides.rubyonrails.org/security.html#mass-assignment
0.8.5
89
2/6/2012 23:04:223.160.8.22991http://pastebin.com/25WV7TwQ

 %h2 Edit Movie  

= form_tag edit_movie_path(@movie), :method => :put do

New pastie: http://pastebin.com/CegypDvcNo route matches [PUT] "/movies/:id/edit"
rake routes confirms that the correct helper to us is movie_path for update
0.8.5
90
3/10/2012 11:25:043.160.822991 = form_tag edit_movie_path(@movie), :method => :put do
= form_tag movie_path(@movie), :method => :put do
Errata is wrong.

Your errata pastie "New pastie: http://pastebin.com/CegypDvc " is for the wrong file, index.html.haml; it should be for edit.html.haml instead.
0.8.5
91
3/8/2012 9:19:033.160.8.12995 = form_tag edit_movie_path(@movie), method => :put do = form_tag movie_path(@movie), method => :put doduplicate entry
92
3/2/2012 9:02:483.160.8.43006%h2 Edit Movie

= form_tag edit_movie_path(@movie), :method => :put do

= label :movie, :title, 'Title'
= text_field :movie, 'title'

= label :movie, :rating, 'Rating'
= select :movie, :rating, ['G','PG','PG-13','R','NC-17']

= label :movie, :release_date, 'Released On'
= date_select :movie, :release_date

= submit_tag 'Save Changes'
%h2 Edit Movie

= form_tag movie_path(@movie), :method => :put do

= label :movie, :title, 'Title'
= text_field :movie, 'title'

= label :movie, :rating, 'Rating'
= select :movie, :rating, ['G','PG','PG-13','R','NC-17']

= label :movie, :release_date, 'Released On'
= date_select :movie, :release_date

= submit_tag 'Save Changes'
corrected uri to put to, in order for update to be processed as intended...0.8.5
93
2/9/2012 8:56:473.160.8.13048So de we really to set up a whole HTTP form just to delete a movie?So de we really NEED to set up a whole HTTP form just to delete a movie?Grammar, missing verb0.8.5
94
3/4/2012 6:28:423.160.8.43053 = link_to ’Delete’, movie_path(@movie), :method => :delete, :confirm => 'Are you sure?'

Book says that above link won't work
It indeed works

= link_to "Delete", movie, :method => :delete, :confirm => 'Are you sure?'
0.8.5
95
3/10/2012 14:14:043.160.8.43066...trying to override this with :method=>:delete simply doesn't work.

...trying to override this with :method=>:delete simply doesn't work.

Add Footnote:
If JavaScript is enabled, the link_to method is actually able to simulate the POST method. Relying on that feature of link_to, however, will make the site depend on JavaScript.
Actually, it DOES work! The Rails API Documentation explains, that it works using JavaScript. So if JavaScript is disabled, using 'link_to' will fail, while 'button_to' will continue to work.duplicate entry
96
3/9/2012 9:08:573.160.8.0116 = form_tag edit_movie_path(@movie), :method => :put do =form_tag movie_path(@movie), :method => :put dothe given code yields a

'No route matches [PUT] "/movies/foo/edit"'

error
duplicate entry
97
3/10/2012 12:10:573.160.8.4noneNew pastie: http://pastebin.com/CegypDvc<Unknown>The error is in the ERRATA for 3.16, not in the kindle/ book:
One of the errata for section 3.16 corrects the edit_movie_path(@movie) helper to the correct one movie_path(@movie) but then gives a wrong PasteBin URL ! I don't know what the correct one is but it is sufficient for the user to make the change as described rather than use the "corrected" PasteBin URL.
duplicate entry
98
3/10/2012 12:11:053.160.8.4noneNew pastie: http://pastebin.com/CegypDvc<Unknown>The error is in the ERRATA for 3.16, not in the kindle/ book:
One of the errata for section 3.16 corrects the edit_movie_path(@movie) helper to the correct one movie_path(@movie) but then gives a wrong PasteBin URL ! I don't know what the correct one is but it is sufficient for the user to make the change as described rather than use the "corrected" PasteBin URL.
duplicate entry
99
3/8/2012 5:08:583.170.8.43152rather than having the controller method set up a variable such as @all=Movie.all and having the view just use @all.rather than having the controller method set up a variable such as @movies=Movie.all and having the view just use @movies.@movies is the common idiom for a view (like index) that shows a collection of model objects0.8.5
100
3/10/2012 12:27:093.180.843172def createdef updateText and name of method are for "create" but function body is for "update". Pick one. Or pick both, but make sure they're both correct.0.8.5
Loading...
Main menu