By Developers, For Developers
PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
---|---|---|---|---|---|
47 | SUGGEST | One: I don’t think you need to pass :layout => false when you render :partial in a controller. I think it assumes that for partials. It seems like there could be some quick discussion on caching next to the one on db indexing too. Listing contacts + tags will give you n+1 queries which is not a good thing. Perhaps this could be a follow-up recipe on caching? | 2006-04-19 | ||
36 | TYPO | Under Ingredients, command output of installation of acts_as_taggable plugin shows checkout of continuous_builder plugin. | 2006-04-12 | ||
19 | TYPO | You’ll immediately notice that RJS implicitly supplies and object “and” should be “an” | 2006-04-12 | ||
9 | TYPO | ’ > element’ should read ’ element’ | 2006-04-12 | ||
99 | SUGGEST | The text speaks about line numbers - “Then, | 2006-04-12 | ||
59 | ERROR | The self.down method is missing: drop_table :rights_roles The complete method should be: def self.down | 2006-04-20 | ||
60 | SUGGEST | The check_authorization method uses right.controller == controller_name when checking the right. This can lead to incorrect authorization when using sub controllers. I use sub controllers often in the projects I work on i.e. The controller_name method returns “articles” leaving off the full class name in this case. The problem is that I may also have a different controller named ArticlesController < ApplicationController and from the rights perspective both return “articles” which can lead to incorrect authorizations. I’ve solved this by changing right.controller controller_name to right.controller self.class.controller_path. self.class.controller_path returns “admin/articles” which is the full controller name I am interested in. Not sure if you want to add a note to this recipe or just change it to use self.class.controller_path which will work in all instances. | 2006-04-20 | ||
1 | 1 | ERROR | The bookmarks for each recipe are erroneously nested under the first recipe of each chapter. | 2006-03-15 | |
1 | 1 | SUGGEST | Recipe suggestion: Using Erb to simplify database.yml (e.g. same login, database name prefix, host for each environment) | 2006-04-12 | |
53 | SUGGEST | I think the section titled “Convert an Existing Application to Migrations” isn’t properly descriptive. Sure, it tells you what it does, but the average reader who doesn’t know what Migrations does wouldn’t know why they want to use Migrations. It should explain what they’re for, e.g. “Manage Your Database Schema Using Migrations.” | 2006-04-19 | ||
27 | TYPO | “When a Rails application boots, it loads its config/environtment.rb file.”.sub(/environtment/, “environment”) | 2006-04-12 | ||
39 | TYPO | In the Tagging extract, the div with the id “contact-<contact.id>” is replaced with the contents of the partial “content”. The problem is that the partial content itself contains that same div with the id “contact-<%= contact.id“, thus resulting in recursive divs which, second time around, confuses javascript (there are now two divs with the same id, what to do?). The solution is to move the container div with the id ”contact-<=contact.id%>” outside of the partial “content” (into the partial “detail”). | 2006-04-20 | ||
11 | TYPO | In the first paragraph: “This is all standard ActiveRecordhas_many( ) fare,”.sub(/ActiveRecor(dh)as_many/,‘ActiveRecord#has_many’) | 2006-04-12 | ||
12 | TYPO | Indentation of the second example looks off (the lines look indented too much) | 2006-04-17 | ||
6 | SUGGEST | This seems like it would be a good place to use a partial and maybe even rjs. It may be beyond the scope of this example, but guiding the user to use partials here to make use of the same code as is used to generate the final entry seems very DRY. | 2006-04-12 | ||
14 | ERROR | It doesn’t seem like your “raise params.inspect” in #sort was supposed to be there. If it was, I would expect it to be referenced somewhere. (It is one way to deal with understanding output, but it isn’t completely obvious to the casual observer) | 2006-04-12 | ||
3 | SUGGEST | A recipie for continuations/wizards would be nice to see. | 2006-04-12 | ||
23 | TYPO | The last two paragraphs “Some digging shows that…” seem to be different version of the same thought. | 2006-04-12 | ||
87 | SUGGEST | http://damagecontrol.codehaus.org/ redirects to a new location, you might want to update the URL. | 2006-03-16 | ||
54 | SUGGEST | In the ‘check_authentication’ method you’re storing the name of the requested action in the session[] hash. If the action also has a corresponding set of @params associated with the request, it appears like that will be lost once the user logs in. So if they were following a link that was supposed to display all users matching a certain critera, (Admin#display_users), that criteria will be lost upon log in. In the check_auth method, can you also store the accompanying params associated with the action, to be re-accessed after log in? | 2006-04-20 | ||
11 | ERROR | acts_as_list :scope => :grocery_list_id You should use ‘grocery_list_id’ or :grocery_list. When you pass a symbol, it adds _id. From the API docs for acts_as_list: | 2006-04-17 | ||
33 | OK | Self-referential Many-to-Many Relationships: | 2006-04-12 | ||
69 | SUGGEST | I was surprised at the suggested way to write fixtures out from data currently in the database. It doesn’t seem like that rails way to drop right down to the database connection and run sql queries! A much better way (in my opinion, at least) is described here: http://rails.techno-weenie.net/tip/2005/12/23/make_fixtures (see comments 9 and 10). Basically, you just add a to_fixture method to ActiveRecord::Base and then run it for each model class. Person.to_fixture, Club.to_fixture etc… simple! Cheers, Jonathan. | 2006-04-19 | ||
7 | ERROR | In the PDF version, the Bookmark hierarchy is messed up. Under each of the main Recipe chapters, only one recipe appears, with the remaining recipes appearing under the first recipe. So Live Preview incorrectly appears to be the parent of Live Search. | 2006-03-15 | ||
12 | TYPO | Last paragraph: include -> included | 2006-04-12 | ||
41 | TYPO | 2nd paragraph, 2nd sentence: “Since we already the list( ) action, it makes sense to modify it for our needs instead”. | 2006-04-19 | ||
112 | TYPO | In the Thunderbird box at the top of the page, it says “…you can download Firefox (http://www.mozilla.com).”, when it should read “…you can download Thunderbird (http://www.mozilla.com/thunderbird/).” | 2006-03-16 | ||
87 | TYPO | In the first paragraph under the Solution header, third sentence, you have, “… is a simple Rake tasks that gets executed …”. The word “tasks” should be “task”. | 2006-03-16 | ||
62 | TYPO | “We then created a Right called Create Recipes and added it to the list of rights afford to our freshly created Role.” I think “afford” should be “afforded”. | 2006-04-20 | ||
60 | 54 | TYPO | “But for now, we’ll just create when using should read… “But for now, we’ll just create one using | 2006-04-20 | |
2 | SUGGEST | If you’re still soliciting for recipe requests, I’d really like to see a better treatment of ‘sidebar’ plugin type modules… sort of like how Typo has pluggable sidebar modules. The Agile book touches on them but not very concretely. | 2006-04-12 | ||
33 | OK | Self-referential Many-to-Many Relationships: class Task | 2006-04-12 | ||
54 | TYPO | But for now, we’ll just create when - should be - But for now, we’ll just create one | 2006-04-19 | ||
54 | TYPO | In the following text, the comma following the word “passwords” is not needed. “Since we don’t want to store plain-text passwords, in the database, we | 2006-04-19 | ||
106 | TYPO | You recommend firefox as email client….thunderbird is probably better ;-) | 2006-03-16 | ||
59 | ERROR | In the code you haven’t dropped the table :rights_roles | 2006-04-20 | ||
1 | SUGGEST | Recipe suggestion: A recipe on how to upload a file to a rails application, with a progress meter would be nice. | 2006-04-12 | ||
37 | SUGGEST | Dear Sir, This is NOT an error report, just a request. I’d love to get more information on polymorphic associations (ie a better and more general picture than acs_as_taggable). Thanks and best regards, Tobie | 2006-04-20 | ||
1 | SUGGEST | Recipe suggestion: A couple of recipes on sharing code between different rails applications. (plugins, engines, sharing with svn:externals,..) | 2006-04-12 | ||
39 | ERROR | I know this is not related to the book’s topic but the code you show on your contacts/list.rhtml page is not standard compliant. If there is no contacts to display, the list will not contain any list elements ( ) and the page would thus not validate. | 2006-04-19 | ||
37 | ERROR | If this is true: “Whatever you do, IT IS ABSOLUTELY IMPERITIVE that you setup the tags database with the field `name`. This has to do with the fact that internally, acts_as_taggable uses a find_by_name method, which does not exist if there is no name column in the tab” (source: http://quirks.exposured.com/?p=6) then you should definitely report it. | 2006-04-20 | ||
8 | SUGGEST | I’d suggest making this chapter more detailed. There is more information here: | 2006-04-12 | ||
53 | SUGGEST | The authentication recipes are cool, but it would certainly be nice to have an example that shows how to expire logged in users, etc.. | 2006-04-19 | ||
52 | DEFER | I would love a recipe on how to create totally seperate accounts for an application, i.e. like Ta-da list. | 2006-04-20 | ||
103 | TYPO | Under Solution: “There are test harnesses in place to see access all of the mail you’ve sent with ActionMailer,” Remove “see”. | 2006-04-12 | ||
103 | TYPO | End of second paragraph under Solution: “An simple example .for-ward file might look like the following.” Should be “A” not “An”. | 2006-03-16 | ||
105 | TYPO | Towards the end of the first paragraph under the code examples: “Namely, we can store each message in a text file under application’s test/fixtures/receiver directory.” Perhaps “our application’s” or “the application’s”? | 2006-03-16 | ||
107 | TYPO | End of first paragraph after the successful test: “We won’t look at the details of the data model here, but just keep in mind that we have a model named Mail (with a cor-responding mails table) that has the expected subject( ), body( ), sender( ), etc. attributes as we as a numeric rating( ) attribute.” End of sentence, should be “as well as” instead of “as we as”. | 2006-03-16 | ||
30 | TYPO | Last paragraph before class AddProductReferenceTable (end of page): “To make the connection, we’ll create a mapping table in our applica-tion’s default database (the same one the cart table exists ins):” Should be “exists in” and not “exists ins”. | 2006-04-12 | ||
65 | TYPO | The YAML file listed (File 38) has duplicate ‘created_at’ fields for records 2 & 3 - whereas #1 has ‘created_at’ and ‘updated_at’… the error is present in the file (File 38) as well, though not consistently. | 2006-04-20 | ||
106 | TYPO | Sentence in Thunderbird box: “If your client doesn’t do give you the option of view a message’s source,” should be: “If your client doesn’t give you the option of viewing a message’s source, ” | 2006-03-16 | ||
50 | SUGGEST | A “further reading” section pointing at the documentation for migrations would be a really useful addendum here. http://api.rubyonrails.org/classes/ActiveRecord/Migration.html Other useful links might be: http://www.robbyonrails.com/articles/2005/11/11/rails-migrations-and-postgresql-constraints Which shows how to extend migrations using ordinary SQL, something that people are pretty likely to want to do. | 2006-04-20 | ||
56 | ERROR | It is not explained why an exception is thrown and how it could/should be catched. | 2006-04-21 | ||
24 | TYPO | ‘and’ should be ‘an’ “You’ll immediately notice that RJS implicitly supplies and object called page which provides all of the JavaScript generation methods.” | 2006-04-12 | ||
54 | TYPO | The color of the second line should be red, not blue. chad> ruby script/runner ‘require “active_record/schema_dumper”; | 2006-07-03 | ||
105 | 99 | OK | These lines probably need = signs. subject “Something for everyone.” (Dave says: actually, they’re ok) | 2006-03-16 | |
54 | SUGGEST | Should this recipe recommend the use of Digest::SHA1 instead of MD5? It appears that MD5 is regarded as slightly weak these days, so it’s probably a good idea to propogate “best practise”. More info: http://www.schneier.com/blog/archives/2005/06/more_md5_collis.html | 2006-04-19 | ||
41 | SUGGEST | This discussion left me somewhat confused, wondering why there was never any mention of Tag or Tagging AR classes, nor of scoping Tags with something like “acts_as_taggable :scope => :account” like you might with acts_as_list. | 2006-04-20 | ||
1 | SUGGEST | Please add some unicode(i18n) recipes. Thanks | 2006-04-12 | ||
1 | SUGGEST | Two recipe suggestions: (1) dynamically handling 404 errors in conjunction with the ExceptionNotifier and (2) establishing subdomain-based accounts. | 2006-04-12 | ||
51 | ERROR | The “alternative way” of making the initial migration work by inserting version “1” into the schema_info did not work for me using SQLite3. The same ‘table exists’ error showed up when running rake migrate. But then I looked at the contents of the schema_info table. There were two rows, with 0 and 1. I ran “DELETE FROM schema_info WHERE version=‘0’” and reran rake migrate, and all was well. | 2006-04-20 | ||
99 | TYPO | The grammar of the first sentence of the Solution is broken. It looks like the word “that” is missing before “is designed”. You may also wish to include a VERP recipe (using per-recipient envelope sender addresses to distinguish the recipient from which a bounce originated). | 2006-03-16 | ||
39 | TYPO | The first code snipped (File 46) is missing a final end statement. | 2006-04-21 | ||
71 | TYPO | Kelly and James shouldn’t be indented in the YAML. | 2006-04-20 | ||
37 | SUGGEST | I agree that more information about polymorphic associations would be a great idea. Additionally, one of the great features of acts_as_taggable is that it is polymorphic, you could extend your example to demonstrate this. | 2006-04-20 | ||
12 | TYPO | 4th non-code paragraph, 15th word: should be retrieved, not retried. “And each GroceryList has a list of FoodItem objects on it, which will be retried by the food_items table’s position column.” | 2006-04-12 | ||
51 | SUGGEST | In many cases, it’s a fair bit of trouble to get your initial schema into ruby format. In the early phases, I prefer to create a regular sql script to drop/add all the initial tables and database objects. At some later point, when other devs come on board or perhaps I have some test data I like, I declare the current schema to be version 0, and start using AR migrations from that point on. When someone else joins the project, they run the ‘create’ script to get to version 0, then run ‘rake migrate’ to do the rest. Letting ‘rake migrate’ fail, then manually setting VERSION=1 seems a bit inelegant to me. | 2006-04-20 | ||
1 | SUGGEST | I definitely agree with the RJS recipe idea, having rjs recipe(s) would be great. Maybe one recipe covering the basics of rjs, and another recipe which has an advanced real-world example of rjs at use. Also, a few more advanced real-world database recipes would be wonderful. Basically the two things I really want to see alot more of is AJAX and advanced databases. Anyways, I’ll be looking forward to all future releases, thanks for the wonderful book. | 2006-04-12 | ||
143 | DEFER | Near the bottom of the page, “|procmail” in an italic font makes the “|” look like a “/”. (Dave says: tricky to deal with this. Let me think about it) | |||
139 | TYPO | he => the, in “we add additional parts to he message,” | 2006-03-16 | ||
139 | TYPO | Bottom paragraph refers to lines by numbers, but there are no line numbers. | 2006-04-17 | ||
149 | TYPO | In the text “Hey bro, I thought you’ d like to see this. It’ s the latest new”, the text between single quotes is rendered in italics. | 2006-04-19 | ||
124 | TYPO | know => knowing in “we need two things: some way of | 2006-03-16 | ||
51 | TYPO | The output from “chad> ruby script/plugin install acts_as_taggable” is actually the output of “chad> ruby script/plugin install continuous_builder” | 2006-04-19 | ||
8 | TYPO | In the last sentence of the last paragraph on this page it reads: “May Rails helpers accept additional…” It should read: “Many Rails helpers accept additional…” | 2006-04-12 | ||
32 | SUGGEST |
A suggestion for the multiple databases recipe: please add a solution to how to go about testing with two databases. I posted a possible solution to the RoR list, but maybe there’s some better way:
in the model:
in the test - instead of “fixtures :people” something like this:
| 2006-04-12 | ||
1 | SUGGEST | Suggestion: example of non-trivial lookup pattern. For example you might want to lookup a person out of a list of thousands. So you want to query the list first with a few parameters (eg age, name, etc), and then select one from the matching records. Usually a pop-up window is used for the lookup. How can this be done in the Rails way? | 2006-04-12 | ||
1 | SUGGEST | Suggestion: how to implement a single-language (but not English) application. No need for Globalize, but how do you override the built-in Active record messages, which are in English. | 2006-04-12 | ||
56 | SUGGEST | It is likely that you need the authentication on several controllers, not just one. In this case, you might want to suggest WHERE to put the logic then. | 2006-04-20 | ||
58 | SUGGEST | This chapter could really use a table diagram (or UML Class diagram), showing the tables, columns and relations. Something similar to the diagrams in chapter 14 of AWDR. | 2006-04-20 | ||
73 | TYPO | “A (n) Author can have many Books” | 2006-03-16 | ||
149 | TYPO | Second phrase under Solution heading: “There are test harnesses in place to see access all of the mail you’ve sent with ActionMailer.” …“see access”? | 2006-03-16 | ||
143 | TYPO | The typo I reported to be on page 149 is actually on page 143 . My PDF reader is reporting them differently. Blah Linux (I imagine my previous submissions were off too) The typo was “see access” in the second phrase of the Solution heading. | 2006-03-16 | ||
80 | TYPO | Text, emphasis mine: But for now, we’ll just create when using the Rails console. I’m pretty sure you that should be “one”. Keep up the good work. | 2006-03-16 | ||
130 | TYPO | Last word of first paragraph following code is ‘actionwebservicea’. | 2006-03-16 | ||
20 | SUGGEST | This section should be called Auto Complete and have a different section called Live Search that involves performing a live search and showing those results on the page. | 2006-04-19 | ||
84 | SUGGEST | The ‘role based authentication’ chapter could benefit from the ‘Many to Many Relationships Where the Relationship Itself Has Data’ chapter… (Dave says: The author says that this is an interesting extension, but would make the recipe too long.) | 2006-03-16 | ||
89 | ERROR | In the signout method’s redirect, home_url isn’t defined unless there is a map.home line in routes.rb (not the default). | 2006-04-12 | ||
107 | TYPO | Last sentence of the first paragraph of the “Solution” reads: it should read: | 2006-03-16 | ||
88 | TYPO | In the first paragraph: | 2006-03-16 | ||
90 | TYPO | “Solution”, first paragraph, first sentence reads: I think should read: | 2006-03-16 | ||
92 | TYPO | Second paragraph, second sentence should end with a question mark: “Now what if we wanted to do something smart with the | 2006-04-12 | ||
118 | TYPO | Second to last paragraph: “Finally, line declares the upload( ) task to” => “Finally, the last line declares the upload() task to” or “Finally, line 18 declares the upload() task to” | 2006-03-16 | ||
39 | ERROR | Recipes 8-14 show as sub bookmarks of recipe 7 instead of the Part II: Database Recipes bookmark | 2006-03-15 | ||
76 | TYPO | First paragraph reads: | 2006-03-16 | ||
57 | SUGGEST | Apparently there is a way to get acts_as_taggable to work with multiple users by adding user_id to the join table. It would be nice if you could cover this. I imagine most implementations will need support for specific tags for individual users. | 2006-04-20 | ||
4 | TYPO | “script.acluo.us” should be “script.aculo.us” | 2006-03-16 | ||
8 | SUGGEST | “What I did was I created” sounds pretty unpleasant. It might be better to use “What I did was to create” instead, or you could just delete the redundant “What I did was” altogether. | 2006-04-12 | ||
80 | SUGGEST | Using un-salted passwords is a situation ripe for abuse. It creates a situation where dictionary attacks are trivial to mount against an application. While I realize that the goal is to provide a framework, I’d recommend adding salting to the framework. I can provide all the code for doing so if you want to include it, including random salting so that no single salt is used. This is a major failing in SaltedLoginGenerator — fixed salting. Also, as someone else mentioned, MD5 has collisions, and more and more being discovered. SHA1 also has a few, but they are much harder to create. I don’t know what the exact probability is with a password-sized datum, but SHA1 is certainly less likely to do so. | 2006-04-12 | ||
10 | TYPO | First paragraph in Solution: “script.acluo.us” => “script.aculo.us” | 2006-04-12 | ||
13 | TYPO | In the last paragraph, “app/vies/contacts/demo.rhtml” should be “app/views/contacts/demo.rhtml”. | 2006-04-12 | ||
35 | SUGGEST | Would be nice to know how to use table_name_prefix in a shared host environment to create different sets of tables for dev, profuction, and testing where user has access to only one database. | 2006-04-12 | ||
135 | OK | On OS X with a working svn install, the line: svn propset svn:externals “rails http://dev.rubyonrails.org/svn/rails/trunk” results in a: (Dave says: youre missing the final ‘.’) | 2006-03-16 | ||
33 | SUGGEST | RJS seems to need EdgeRails since not included in Rails 1.0 | 2006-04-12 | ||
86 | 80 | ERROR | I second the suggestion about MD5, but I make it more emphatic. No new applications should be using MD5, period. Any type of use that is even tangentially related to security should not rely on the non-collision features of MD5, since they have been repeatedly demonstrated to be broken. Even if you are using MD5 in a way that you do not think involves security, there are often subtle ways that your application can be exploited that might be overlooked. It is best to go with SHA-256, or barring that, SHA-1, which is showing signs of wear but still secure given today’s computing power. | 2006-04-12 | |
129 | SUGGEST | Some help on installing edge rails for Windows | 2006-04-12 | ||
29 | OK | in the Indgredients list you should put: | 2006-04-12 | ||
85 | ERROR | def self.drop doesnt drop the rights_roles table | 2006-03-16 | ||
1 | SUGGEST | Write about web analytics with rails | 2006-04-12 | ||
80 | TYPO | To add to the above, you can salt with the username, which adds no extra columns to the Users table. | 2006-04-12 | ||
10 | SUGGEST | “One of the things I love about Rails is that, though I enjoy taking advantage of many of the user inter face benefits that JavaScript provides, I really don’t like writing JavaScript code.” Skip the part between commas and this phrase becomes: “One of the things I love about Rails is that I really don’t like writing JavaScript code.” which doesn’t read right. | 2006-04-12 | ||
9 | SUGGEST | In-place form editing is cool, but I notice (unless I have made a silly error) that validators are bypassed when this technique is used. I suggest that this caveat of inplace editing is included in the discussion, or ideally that a fix or workaround is included in the recipe. Many thanks and keep up the good work! | 2006-04-17 | ||
41 | ERROR | Self-referential many-to-many: def no_more_mr_nice_guy: | 2006-04-20 | ||
1 | SUGGEST | Juggestion for a recipe: how to load tons of data into the database. - 150 seconds if you do it create by create After a lot of searching in the source, I now simply create a pure SQL string that adds everthing in one go. Take 0.3 seconds. :-) I use ActiveRecord::Base.connection.execute(“insert into my_table values (null, ), (null, ), … ”) but there’s probably a better way to do it. It’d be nice to see a recipe about it. | 2006-04-12 | ||
1 | SUGGEST | Recipe idea: combine the many-to-many and polymorphic recipies into a user/group authorization authorization framework. | 2006-04-12 | ||
86 | SUGGEST | My taste in OO is to move the code starting with user.roles.detect to the User object as a has_right method. This keeps the code cleaner in the Controller and places the logic where it belongs, I think. | 2006-04-19 | ||
20 | ERROR | First, this isn’t a “live search” it is an autocomplete restricted to one colomn in one table. Second, to get it to work, you need to add the auto_complete_for :recipe, :name at the beginning of the recipe controller. | 2006-04-19 | ||
102 | TYPO | Last paragraph: “…a generator is laid out as in as shown in Figure 1.2” - this should be: “…a generator is laid out as shown in Figure 1.2” | 2006-04-12 | ||
86 | SUGGEST | The indentation of check_authorization seems odd. Is this simply a rubyism to deal with blocks in conditionals? | 2006-04-12 | ||
86 | OK |
right.controller controller_name && (right.action action_name || right.action.nil?) | 2006-04-12 | ||
80 | SUGGEST |
class User < ActiveRecord::Base require ‘digest/md5’ def password=(password) | 2006-04-12 | ||
92 | SUGGEST |
def check_authentication | 2006-04-21 | ||
55 | SUGGEST | Nowhere on this page does the author explain where this piece of HTML should go, nor is there any explaination given of how a person could convert this to be used with a default application controller to provide security for all of the pages in an application except for the login screens and such. | 2006-04-20 | ||
90 | DEFER | Recipe Suggestion: How to use LDAP/Active Directory for authentication only - integrate LDAP into Recipe 15 (Authentication) but also have it play nicely with Recipe 16 (Role-Based Authorization) | |||
190 | OK | Page 190 describes how to get the source code: Rails Recipes Home Page There is no source code avaialble on that page. | 2006-04-12 | ||
160 | TYPO | “have become a first-class citizens” -> “have become first-class citizens” | 2006-03-16 | ||
82 | SUGGEST | In the ‘extending associations’ recipe, it might be a good idea to mention the implicit way of extending the functionality of AR associations: add a class method to the associated model. This will achieve the same effect, if you’ve got a method that is useful outside the association as well. Following the example scenario in the recipe: class Student < AR::Base This would allow Grade.below_average in addition to Student.find(:first).grades.below_average. | 2006-04-12 | ||
99 | ERROR | At the end of the page the next mapping is created on routes.rb: map.connect ‘popular/:tag’ , :controller => ‘recipes’, And the text says: The correct text should say: | 2006-03-16 | ||
47 | TYPO | "YAML has a little-used feature called “merge keys | 2006-04-19 | ||
80 | TYPO | “Student class has_many( )Grades.” >> Needs space before Grades | 2006-03-16 | ||
82 | ERROR | No bookmark for the new Dynamic Database Config chapter. | 2006-03-15 | ||
74 | ERROR | The example code near the bottom only works if you haven’t run ‘rake migrate’ first, since it insert another record into schema_info instead of changing the value of row one. For the tutorial to work as written, replace the Insert statment with an update one like this: | 2006-04-20 | ||
158 | ERROR | No Bookmark for “Quickly Inspect Your Sessions’ Contents” | 2006-03-15 | ||
74 | SUGGEST | It would be nice to have a few references to where to go to learn more about migrations. | 2006-04-19 | ||
152 | SUGGEST | It’s probably worth adding a mention about “conditional GET” and If-Modified-Since headers in the Discussion section. Once you serve up feeds, you tend to find that the feed readers will hammer your server. Conditional GET can really lighten the load. I got my implementation from: http://manuals.rubyonrails.com/read/chapter/62 — it was easilt adapted to my Atom feed. | 2006-04-20 | ||
4 | TYPO | You have a spelling error: script.acluo.us (line 5) should be script.aculo.us | 2006-03-16 | ||
98 | OK | in the extract_fixtures script, changing the (Chad says: I don’t really want people to get into the habit of thinking the fixture keys are somehow linked to the record id - no change) | 2006-04-17 | ||
50 | DEFER | There is a code snippet on this page. The actual code is colored blue and the result is considered to be colored green. If the result is more than one line, the text color is blue (but it should green). It occurs on several other pages, too. (Dave says: the ‘#’ character confuses our syntax highligher, making it color the line as a comment. Kinda hard to fix.) | 2006-07-03 | ||
v | OK | The line is too long and throws out the contents numbering. (Dave says: we deal with this kind of stuff during layout.) | 2006-03-15 | ||
165 | OK | The link extends off the page. Also the page is missing the report erratum off the bottom. (Dave says: we fix these kinds of issues when doing the final layout) | 2006-03-15 | ||
1 | TYPO | Receipe 17 and 32 are not listed in the content pages | 2006-03-15 | ||
8 | TYPO | The last sentence on tha page starts with: “May Rails I think the first word should be Many and May. | 2006-04-12 | ||
1 | SUGGEST | Editing associated objects in the same form. | 2006-04-12 | ||
95 | TYPO | The text says “after two minutes” but the code has “10.minutes.from_now”. | 2006-03-16 | ||
13 | ERROR | app/views/contacts/demo.rhtml Span requires a class to work. Some Value | 2006-04-19 | ||
17 | TYPO | Typo is now located at: http://www.typosphere.org/ | 2006-04-12 | ||
17 | OK | layouts/standard.rhtml | 2006-04-12 | ||
87 | ERROR | conditions for name and password should include quotes around them: Additionally, MD5.hexdigest(foo) is a little easier than MD5.md5(blah).hexdigest. | 2006-03-16 | ||
86 | OK | on the part where you use the Rails console to create a user.. should say: => false That’s what mine does anyway. | 2006-03-16 | ||
71 | ERROR | In recipe 14 “MTM Relationships where the Relationship…”, your Subscription class belongs_to associations should be singular, not plural. class Subscription < ActiveRecord::Base | 2006-04-17 | ||
65 | TYPO | 3rd paragraph: “After require()’ing active_record/schema_dumper (it’s not loaded by Rails by default), a call to ActiveRecord:SchemaDumper.dump() will result in your default database’s scheme being dump to your console.” I think that should end “being dumped to your console.” | 2006-04-20 | ||
115 | TYPO | Last paragraph reads: “By convention, a generator is laid out as in as shown in Figure 1.3 .”, should read: “By convention, a generator is laid out as shown in Figure 1.3.” | 2006-03-16 | ||
129 | SUGGEST | The proper debugging/check for the post-commit hook is described in the Subversion FAQ - http://subversion.tigris.org/faq.html#hook-debugging | 2006-04-12 | ||
14 | SUGGEST | Shortcut :) in_place_editor_options[:url] ||= | 2006-04-12 | ||
1 | SUGGEST | I have been working on making a self-referential habtm relationship | 2006-04-12 | ||
81 | TYPO | on text for including module in model: It would only work for me if I did the following: | 2006-04-12 | ||
56 | TYPO | extraneous close tag in the javascript_include_tag example | 2006-04-20 | ||
173 | TYPO | Just a little typo: “…send and receiver simple….” —> receive | 2006-04-12 | ||
176 / 182 | TYPO | Beginning of last paragraph for “Secret URLs” reads like: “The URL for our the feed for inbox number 5 […]” | 2006-04-12 | ||
45 | TYPO | The last paragraph says “he’ll see be confronted with …”, should say “he’ll be confronted with …” | 2006-04-20 | ||
182 | ERROR | There is a breakpoint in the authenticate_access_key method | 2006-04-12 | ||
35 | ERROR | The ERb code to generate the Javascript does not work if someone’s name has an apostrophe. Using double quotes instead of single quotes will allow us apostrophe-saddled folks back in the game. | 2006-04-12 | ||
142 | TYPO | The phrase that reads “…and in the background an email like the on in Fig- Thanks. | 2006-04-12 | ||
140 | ERROR | Recipe 31 entitled “Getting Notified of Unhandled Exceptions” requires Rails 1.1 as of Rails Changeset 3900 from earlier today (http://dev.rubyonrails.org/changeset/3900). This Changset modified plugins/exception_notification/lib/exception_notifiable.rb to use the new respond_to API which was added in Changeset 3838 on March, 11th. The result of running the code in the recipe in a non-1.1 system is NoMethodError in If you installed the exception_notification plugin prior to today, however, you’d probably be OK. If there are any questions, please let me know. Thanks. Steven Smith | 2006-04-12 | ||
25 | TYPO | In the second to last paragraph, before that code sample, you have the sentence: “As always, […] make sure you’ve include the necessary […]” It should say “…make sure you’ve included…” No typos found till then so far. And usually I catch them all ;-) Philip | 2006-04-12 | ||
146 | TYPO | “processed aftermusicians.csv’s last update.” Needs space before “musician.csv’s”. | 2006-04-12 | ||
131 | SUGGEST | “, before we perform the upload, we need to make sure musicians.xml is up to date” Could you give a few more details about where/how is check takes place in the example? What is this line doing exactly: “file ‘musicians.xml’ => ‘musicians.csv’ do |t|” and why isn’t it defined using the ‘task’ keyword like the other task: “task :upload => ‘musicians.xml’ do |t|” | 2006-04-17 | ||
39 | TYPO | “he’ll see be confronted with “see” or “be confronted with” (not both). | 2006-04-19 | ||
95 | TYPO | :conditions => [“username = ‘?’ AND password = ‘?’ ”, This line shouldn’t have quotes around the ?s. That results in there being two single quotes before and two single quotes after. It should be as follows. :conditions => [“username = ? AND password = ? ”, | 2006-04-12 | ||
93 | ERROR | FYI, On Windows in Rails 1.0, digest/md5 is already loaded in the console. C:\\>ruby script\\console C:\\>irb | 2006-04-12 | ||
35 | ERROR | As i included the generated javascript with ’ my navigation bar disappeared in firefox 1.5 under linux. ’ ’ solved the problem. | 2006-04-12 | ||
115 | OK | Does not match style of rest of book | 2006-04-12 | ||
45 | ERROR | Does not match style of rest of the book | 2006-04-20 | ||
50 | ERROR | Since the default name for a HABTM join table would be “carts_products”, that’s what you used as the :join_table in both the ProductReference and Cart model classes. However, I don’t see that you created the “carts_products” table. You made a table called ProductReferences, like the model class name. I’ve not used HABTM and I didn’t test this code to see if it actually works, but if there’s some behind-the-scenes magic, could you explain it? Or is this a typo? Maybe the table migration (.up and .down) should be changed to “carts_products”? — Wes | 2006-04-19 | ||
106 | SUGGEST | In Ch. 24 the book give the following example: map.connect ’ :user’ , :controller => ’ recipes’ , The chapter never explains what :filter is all about. It would be helpful if it did. | 2006-04-17 | ||
51 | SUGGEST | Recipe 10 Connecting to Multiple Databases. By following the code in this recipe (by creating a base class that has the call to establish_connection to the 2nd database) I have successfully connected to MySQL as the primary database and Oracle for the second database. Everytime I do something with a Model that uses Oracle it opens another connection to Oracle. I didn’t think it was suppose to do that. | 2006-04-20 | ||
62 | TYPO | After the code excerpt from _content.rhtml, Chad writes, “This is mostly typically display code.” I think it’s meant to read, “This is mostly typical display code.” | 2006-04-20 | ||
83 | TYPO | Missing space. “Associating a Person with an Address populates both the addressable_idand the addressable_type fields.” Should read, “…populates both the addressable_id [SPACE] and the addressable_type…” | 2006-04-12 | ||
179 | TYPO | In the third paragraph, the first sentence starts out as, “Finally, could you install…”. The words “could” and “you” should be reversed so that it reads, “Finally, you could install…”. | 2006-04-12 | ||
71 | TYPO | find: description: “dump” changed to “dumped” | 2006-04-17 | ||
51 | ERROR | I have followed the example in the recipe about connecting to multiple databases. My primary database is MySQL, the secondary database is Oracle. The establish_connection call is in a base class just like recipe. The problem is every time I do anything with that model it opens another connection to oracle. It will just keep opening oracle connections forever. | 2006-04-20 | ||
145 | ERROR | This handy bit of info at the end of the Continuous Integration recipe is bogus. The migrate runs BEFORE the new migration gets checked out, which is totally useless. Assuming you’re using migrations to manage schema changes, you can easily solve this problem by changing the invocation of Rake to look like the following: | 2006-04-19 | ||
63 | TYPO | In the fourth paragraph, second sentence, you have, “Since we already the list() action …”. It should probably be, “Since we already have the list() action …”. The word “have” is missing. | 2006-04-20 | ||
15 | OK | In the in_place_select_editor definition at the top of the page, the “if” statement near the bottom is missing its “end”. | 2006-04-12 | ||
133 | TYPO | pg133 — “would set it’s first line” that’s a possessive its, not an apostrophized it’s (“it has”). | 2006-04-12 | ||
173 | TYPO | pg173 — “Application users can then send and receiver simple messages” “send and receive” | 2006-04-12 | ||
35 | SUGGEST | The text refers to Autocompleter.Local. Perhaps it’s better to give a reference to this rather than requiring users to do a web search on it. | 2006-04-19 | ||
206 | TYPO | Don’t be alarmed if this sounds like a for you’d have to 9th word should probably be `form’. | 2006-04-12 | ||
164 | TYPO | Here’s what our recipes.xml it should be recipes.rxml | 2006-04-12 | ||
99 | ERROR | in the code example is says to use layout ‘standard’ (with single quotes) it should be (as far as i can tell) with double quotes (ther are other occurences of this in the sql used in the recepie before this) brilliant book! | 2006-04-12 | ||
73 | ERROR | “But we still have a problem. Our existing database isn’t ready. In its present form, this migration will wipe out our existing data:” Isn’t it the migration files that ‘aren’t ready’, not the database? “Our existing database isn’t ready.”: i found this sentence confusing. | 2006-04-19 | ||
72 | SUGGEST | “Here is what the migration file should look like:” Perhaps insert a preemptive warning here not to run this migration if you want to avoid data loss. | 2006-04-17 | ||
74 | SUGGEST | I’d really appreciate more information about how schema_info relates to migration file numbers because i found the information at the bottom of this page confusing. eg. a diagram, or a couple of plain language examples describing what steps ActiveREcord goes through when deciding how to deal with a ‘rake migrate’ command. Put another way: why does the migration complain about duplicate tables when schema_info is set to 0, and not when it’s set to 1? | 2006-04-20 | ||
13 | SUGGEST | Maybe it would be better to put the code in application.js since that is already created and included in :defaults in Rails 1.1. | 2006-04-19 | ||
14 | TYPO | On IE 6, I had to change the code to the following because IE didn’t like a string with opening quote on one line and closing quote on another line. Some Value | 2006-04-12 | ||
8 | TYPO | Last sentence on page: “May Rails helpers accept…” should be “Many Rails helpers accept…”. | 2006-04-12 | ||
14 | ERROR | This doesn’t work on IE 6. The previous fix I submitted removes javascript errors, but when you click on the text the drop down menu doesn’t have any values in it. It works on Firefox though. | 2006-04-20 | ||
18 | OK | You are missing the links to the files for example code. | 2006-04-12 | ||
26 | TYPO | One extra <% right after initial comment and %> and <% at end of file. <% <%= <% | 2006-04-19 | ||
32 | TYPO | With Rails 1.1 candidate build on Windows XP I get the following error which prevents the example from working. NameError (uninitialized constant VERSION): It works fine if I replace Rails::VERSION::STRING with “1.1”. | 2006-04-12 | ||
169 | TYPO | “rails community” should be “Rails community” | 2006-04-12 | ||
29 | TYPO | under “Solution”: | 2006-04-12 | ||
77 | ERROR | Not sure if this is a true technical error, I will let you decide. In your model definition you use a plural model to describe the relationship of belongs_to (which the rails API defines in the singular) http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html example: belongs_to :firm, :foreign_key => “client_of” I followed your example in the book to implement a through relationship in my application but it seems to be broken in rails 1.1 Hope this helps, :-) Best, | 2006-04-12 | ||
2 | TYPO | Text says “…find the e-mail tab…” but the tab is called “Mail” | 2006-04-12 | ||
171 | TYPO | “taken from it’s directory name” — should be “its” | 2006-04-12 | ||
171 | TYPO | “extend() is used here instead of include” — should be “include()” (?) | 2006-04-12 | ||
115 | ERROR | In the “Stub out Authentication” recipe, the :logged_in? method uses `local_request?` which always returns false for me during functional tests… even on 1.1 revision 4021, with ‘all requests are local’ being true in my ./config/environments/test.rb Since all requests are local while in development anyway, it might be a sounder idea to replace `local_request?` with `true` … unless of course you’re going to put your app into production without proper authentication :/ | 2006-04-19 | ||
34 | ERROR | I’m a newbie so this may be nothing. I tried the Lightning-Fast JavaScript Auto-completion yesterday but it didn’t work. In the controller “book_controller.rb” I had to add on the last line “render(:layout => false)”. Otherwise the included view “authors_for_lookup.rhtml” is rendered as a normal page. Hope I didnt do something stupid. | 2006-04-12 | ||
13 | TYPO | Near the end of the page: app/vies/contacts/demo.rhtml should read app/views/contacts/demo.rhtml | 2006-04-12 | ||
163 | ERROR | svn externals command for edgerails: svn propset svn:externals “rails http://dev.rubyonrails.org/svn/rails/trunk” returned this error (on windows XP): svn: Explicit target required (‘rails http://dev.rubyonrails.org/svn/rails/trunk’ interpreted as prop value) | 2006-04-12 | ||
163 | OK | Include a recipe for creating a new rails project on the edge, not just putting an existing project on the edge. (Chad says he won’t have room this time around) | 2006-04-12 | ||
46 | TYPO | Second paragraph of Solution, first line config/environtment.rb should be config/environment.rb | 2006-04-20 | ||
1 | SUGGEST | Need more details on authentication steps: Also, my rails app also sends email via SMTP. The production.log makes it look like it is successfully sending emails, but I’m not getting the emails. Tips in the email chapter about where to look next to debug this type of problem would be helpful. | 2006-04-12 | ||
77 | ERROR | I was implementing a model based on the Many-to-Many where relationship has data in Recipe 16. Is the Subscription model correct to have the belong_to naems pluralized? (belongs_to :readers, belongs_to magazines) When the belongs_to is pluralized in my code, I get “NameError” errors when trying to call the :through association. Singularizing the belongs_to fixes my problem. Another excellent book by the Pragmatic Programmers! | 2006-04-12 | ||
176 | ERROR | There’s a `breakpoint` leftover in the `authenticate_access_key` method definition. | 2006-04-12 | ||
35 | TYPO | “…the JavaScript library that supports this functional…” should be “…the JavaScript library that supports this functionality…” | 2006-04-12 | ||
86 | SUGGEST | In this recipe, on association extensions, I’m missing some details on how to access the different objects if you need to. For e.g. student.grades.my_method(), inside the my_method() definition you’d use self to refer to the grades Array. You might want to mention this. Also, how would you refer to the student object? I’ve solved this by doing self[0].student plus nil handling, but that’s not very elegant. | 2006-04-20 | ||
1 | SUGGEST | Recipe idea: validation with Ajax updates. When e.g. using the in_place_editor, or adding items on-the-fly, any validation errors will normally not be displayed to the user. My way of solving this is essentially to return (possibly as JSON) some error data with a 500 error code, so that onfailure is triggered and does something useful with the error data. | 2006-04-12 | ||
57 | ERROR | this code: def no_more_mr_nice_guy(friend) should be: def no_more_mr_nice_guy(friend) or else rails will puke a ‘stack too deep’ error (1.1 edge rev 4125) | 2006-04-20 | ||
206 | TYPO | First paragraph in the solution to bounced email: | 2006-04-12 | ||
61 | TYPO | In the listed ruby code for the tagging section, the following code segment (shows up in two places) has a space in it that prevents the Edit link from working: “Element.toggle($(’ #{form_id}’ ))” If you remove the space - the code works correctly. I did a copy/paste from Adobe to the text editor and the space showed up. | 2006-04-20 | ||
9 | SUGGEST | I tried putting this in my view but I didn’t get a textarea, ony a regulat text edit field: <%= in_place_editor_field :activity, :introduction, in_place_editor_options = {:rows => 8, :cols => 60} %> I also tried this an a regular text field to increase the width: %= in_place_editor_field :activity, :short_title, in_place_editor_options = {:cols => 60}% and also this: .inplaceeditor-form input[type=“text”] { I’m using Rails 1.1 | 2006-04-19 | ||
25 | ERROR | I am using latest rails/rake and I think the task names and Task class have changed. Here is my clear_database_prerequisites.rake. | 2006-04-19 | ||
165 | TYPO | I think it would be a good idea to html escape recipe.author.name in the example xml builder template: xml.author h(recipe.author.name) | 2006-04-12 | ||
94 | ERROR | The code for authentication is missing from the source code archive available here: http://media.pragprog.com/titles/fr_rr/code/fr_rr-code.tgz | 2006-04-12 | ||
26 | OK | the “show @grocery_list” function already exists in the scaffolded controller, and doesn’t need to be typed in | 2006-04-12 | ||
93 | SUGGEST | require ‘digest/md5’ will frequently give ‘false’ not ‘true’ (if already loaded). I think this should be explained… :) | 2006-04-12 | ||
94 | TYPO | Quotes around the ? in the SQL conditions in the signin action will cause it to fail. They should be omitted. :) | 2006-04-12 | ||
191 | TYPO | “…it just doesn’t looks very…” Should be: | 2006-04-12 | ||
119 | ERROR | the extract_record task won’t properly escape the data. I have a db full of email messages containing all sorts of weird characters (as one might expect). The script will extract fixtures, but the fixtures will not load. could be a bug in to_yaml. still trying to figure out what the inject() call is actually doing. in particular, records which contain irb snippets in their bodies cause particular problems. | 2006-04-19 | ||
49 | TYPO | The last prose sentence on the page ends with this parenthetical clause: " (the same one the cart table exists ins):" Of course “ins” should be “in”. | 2006-04-20 | ||
119 | ERROR | The extract_fixtures task fails to escape erb markup which may be contained in the data. for instance a record of an email & body as in my case: mail_record.1: unfortunately, erb can only escape_html, which is inappropriate. Should maybe call YAML.escape somewhere? | 2006-04-19 | ||
163 | TYPO | “overload plaguing some many of us” should probably read “overload plaguing so many of us”… | 2006-04-17 | ||
1 | DEFER | For the section on html email. I saw in your source files that you do not have a css file or any images included. A slightly more advanced example will be immediately required by almost any reader. Complete paths are required for everything. Also the and tags have issues with email readers. The use of layouts and templates are tricky too. See the Agile Rails book errata web page for a suggestion for page 415 (and 413). see this link for details about what works in email readers Something like \t (Chad can’t duplicate the problem) | 2006-05-14 | ||
12 | TYPO | Another thing I observed about In-Place form editing - on my machine, if a field never got a value before you started doing in-place form editing on the form, you can’t add a value - I’m not sure if this is another gotcha, or there’s a work around, and something you might want to point out. | 2006-05-14 | ||
251 | SUGGEST | The migration at the top of the page doesn’t have the line: drop_table in the def self.down method. | 2006-05-14 | ||
127 | OK | The Authentication recipe seems a little incomplete. A more complete recipe might be something like putting a login_exception.rb in lib: then raising that in User.authenticate: raise LoginException, “Username or password invalid” rescuing it in the controller with a flash to capture the exception error message, then redirect back to the signin form: def signin and have the signin form display the error: <% if flash[:error] then %> <%= flash[:error] %> <% end %> (Chad says: I think people can put this together for themselves (as did this reader) | 2006-05-14 | ||
29 | TYPO | "We | 2006-07-03 | ||
281 | DEFER | Your example only produces a plain text e-mail. What if the user wants to send either an HTML email or a multipart/alternative email along with the attachment? | |||
22 | SUGGEST | Maybe you should add that the RedCloth library has to be installed for the textilize method to work. | 2006-07-03 | ||
6 | ERROR | Unfortunately I’m just having the extract of running rails without databases and the following code [:test_units,:test_functional,:recent].each do |name| don’t seem to be working as Rake API changed somewhat. This is what works me instead: [“test:units”,“test:functionals”,“test:recent”].each do |name| | 2006-05-14 | ||
148 | OK | While you’re setting up the search action, you might as well also setup the display action so that your detail views are properly scoped and available in the view template as @detail. def self.search_action_for(table, options = {}) | 2006-05-14 | ||
230 | ERROR | File.open (path, ‘w’) in save_fullsize for image does not work. It have to ‘wb’ to write binary data. otherwise data got courrpted and get error message during rmagic call. | 2006-05-14 | ||
31 | DEFER | I suggest adding a Discussion entry to this recipe to explain why lists were used instead of tables. Due to browser incompatibilities sorting in tables isn’t supported by Script.aculo.us (table row sorting works in Firefox for example but not in Safari). Thomas Fuchs could probably go into more detail about this issue. | |||
32 | TYPO | “Potential solutions to this problem using the :update are messy and problematic.” probably want to take out the “the” in “the :update”. | 2006-05-14 | ||
149 | OK | "Finally, there may be some cases for which we don | 2006-05-14 | ||
160 | TYPO | "by ActiveRecord to manage migrations, so we wouldn | 2006-05-14 | ||
161 | TYPO | “To extract the fixtures from your production database, you would run set the RAILS_ENV environment variable to ”production“.” “Run” seems left over from an earlier version of the same sentence which probably said something like “run in production”. | 2006-05-14 | ||
141 | OK | I suggest some differentiation between the new and edit functions simply because the edit template will differ. By trying to use the edit template for everything, you may introduce a fair amount of unnecessary conditional logic into that template. E.g.: def edit Note that I’ve used Catalog instead of the original Recipe. That’s because I’m using this in my app — you’d have to change the object back to Recipe to correspond to the original. | 2006-05-14 | ||
49 | TYPO | missing parenthesis. “If you turn your head to the side and squint at this code, you can see that, in the loop, it defines a method with the same name as each helper (such as text_field() and text_area() which sets up a table row,” should probably be “(such as text_field() and text_area())” | 2006-05-14 | ||
51 | TYPO | “Discussion: Anything special to say about this one?” Realistically you guys probably already have seen this, since it’s obviously placeholder text, but fwiw, this would be a great place to put pointers to info re: metaprogramming in Ruby, or perhaps just why metaprogramming can be so readable. | 2006-05-14 | ||
116 | TYPO | Shouldn’t | 2006-05-14 | ||
194 | SUGGEST | I believe you’d want something like this to prevent duplicate Musicians at each run of the rake task. Musician.create(data) unless Musician.find_by_given_name_and_surname(data[“given_name”], data[“surname”]) | 2006-07-06 | ||
15 | DEFER | Hi Using innerHTML here to add options to a select box won’t work in, for example, IE6/win. I would recommend adapting the recipe to use the new Ajax.InPlaceCollectionEditor (as of script.aculo.us version 1.5.3). I’ve got some code if you want it: dave@textgoeshere.org.uk Best, | |||
128 | OK | After following the code examples and trying to use script/console to run the example User.create and subsequent User.password, Rails seems to not think that the password method exists. Aside from the changes below in the model (I use first_name, last_name, and email_address instead of just username) I have followed the book verbtim, even going so far as to recreate the rails project from scratch. lusciouscreamy:~/Sites/usermanager nick$ ruby script/console (Chad could not reproduce this) | 2006-07-06 | ||
124 | ERROR | It would be nice if you added ‘require “digest/sha2”’ to the User class. That way people won’t have to look up the proper require statement. | 2006-07-06 | ||
62 | OK | This: Note that we | 2006-07-03 | ||
59 | TYPO | 2 errata, same page, one submission. Remove “by” from this sentence, below the listing for models/product.rb As we learned earlier, by Active Record establishes connections in a In the following sentence, change “looks” to “look”: When attempting to make a database connection, Active Record models looks for the connection associated with either themselves or the nearest superclass. | 2006-07-03 | ||
234 | ERROR | Globalization example does not work. Since I’m still waiting for the printed book and have no access to the beta, I’m referering to the excerpt (so this error might have been fixed already). Before you can switch the locale and create a translation (here in ar-LB) you need to explicitely save and reload the record with the base locale. For more info see here: http://www.ruby-forum.com/topic/65900#79816 | |||
84 | ERROR | The footnote (11) for the rake task db:schema:dump says ‘Or db:schema:dump if you’re using Rails 1.0’ - it should say ‘db_schema_dump’. | 2006-07-03 | ||
118 | OK | Since you’re storing the user’s ID, not a User object, it might be clearer to rename session[:user] to session[:user_id] | 2006-07-03 | ||
117 | TYPO | Linked file admin_controller.rb seems to be missing the line: | 2006-07-03 | ||
53 | ERROR | The recipe doesn’t work with an app generated with Rails 1.1 (which include integration tests - they fail in that case). The fix should be to add :test_integration to the list of prerequisites to be cleared: [:test_units, :test_functional, :test_integration, :recent].each do |name| | 2006-07-06 | ||
72 | OK | For Rails 1.1 I get “undefined method `parse’ for Tag:Class” and needed to delete models/tag.rb in order to fix it, solution was taken from http://noobonrails.blogspot.com/ (Chad says: this problem was because the user already had a model named Tag, so the class names conflicted) | 2006-07-06 | ||
134 | TYPO | http://locahost:3000/uta/tumba/chennaagide is missing an l in (should be localhost and not locahost) | 2006-07-03 | ||
264 | DEFER | As the default behaviour of Rails in test mode is to append Email to an array, not actually send it, it might be an idea to briefly cover Email Configuration at the start of this chapter. Otherwise people might be confused when their HTML email never arrives in their inbox. | |||
254 | ERROR | It seems that if you call the view for the HTML part “multipart_alternative”, as is suggested in the manual, Rails will use this as the first part of the email, as well as the HTML part. This produces a three part email, instead of the desired two, and Mail at least presumes that the first part is the plain text alternative, which causes some problems. When I changed the name of the view being called to “multipart_alternative_rich” this solved the problem. | |||
57 | TYPO | So, in the default case, all your models get access to this default con- nection. But, ActiveRecord::Base. If you make a connection from one of your model classes (by calling establish_connection( )) >>> In the first full paragraph you have “But, ActiveRecord::Base.” I assume that part of a sentence is missing here. Given the importance of this to some people, please provide the rest of the sentence. Thanks! | 2006-07-03 | ||
119 | TYPO | The line if request.post? is missing from the final code listing | 2006-07-03 | ||
27 | OK | I had to change the call to start_form_tag to get the code to work. from <%= start_form_tag({:action => “save”}, :id => “entry-form”) to: <%= start_form_tag({:action => ‘save’}, {:id => ‘entry-form’}) %> I’m using rails REVISION_4365 (Cahd could not reproduce this) | 2006-07-06 | ||
126 | SUGGEST | At the end of first page of “Recipe 31: Authenticating Your Users”, it shows the generation of a migration to create the user table. On the next page, it shows generating a model for User after “rake migrate” is called. This order of steps doesn’t work well with the current version of Rails (1.1.x). When you generate the model for User a migration is automatically generated. If you wish to adhere to the current Rails generation mechanism, one should generate the model, update the create migration and then run “rake migrate” to create the table. The procedure in the book leaves an extraneous migration file that should be deleted. | 2006-07-06 | ||
134 | OK | Please include a description of the “signin_form”. What is “signin_form”? It shows up twice in code examples, but no where is the member function or rhtml shown. How does it differ from “signin”, which is shown in an earlier recipe? (Chad feels that the concept is probably widely ubnderstood, and would rather not add more content to this recipe) | 2006-07-06 | ||
8 | TYPO | capitalize IRC | 2006-07-03 | ||
146 | TYPO | created_at is listed twice instead of using updated_at | 2006-07-03 | ||
147 | TYPO | created_at is duplicated | 2006-07-03 | ||
168 | TYPO | so is it ERb or eRB? | 2006-07-03 | ||
256 | TYPO | URL runs off page | 2006-07-03 | ||
84 | TYPO | “Of Rails 1.0” should read “As of Rails 1.0” | 2006-07-03 | ||
123 | OK | “def self.up” is indented on space too many | 2006-07-06 | ||
116 | TYPO | When doing “ruby script/generate model User” it creates another migration even though we previously built one by hand. | 2006-07-06 | ||
75 | TYPO | There seems to be an extra on the bottom of the _content partial. | 2006-07-03 | ||
28 | TYPO | it’s “the_list” in the book but the download link to change.rjs contains “the-list” | 2006-07-03 | ||
29 | OK | mixes hyphens with underscores | 2006-07-03 | ||
122 | TYPO | The automatically created migrations are XXX_create_roles.rb and XXX_create_rights.rb not XXX_add_ | 2006-07-03 | ||
31 | OK | "… if you are using layouts, you | 2006-07-06 | ||
22 | OK | "you can | 2006-07-03 | ||
37 | TYPO | Closing span tag has extra indentation. | 2006-07-03 | ||
44 | TYPO | Between ‘class’ and right before the class’ ending ‘end’ the indentation is one more than it should be. | 2006-07-03 | ||
46 | TYPO | The “class” line appears to be cut off | 2006-07-03 | ||
284 | ERROR | In the code, node.to_s.gsub(/</, “<”) is trying to replace the less-than with the HTML code for less-than. The expression in the book is double encoded, which would cause the user to see “<” instead of “<”. The replacement should be “<”. | 2006-07-06 | ||
42 | ERROR | The line: consistently gives me the error: However it works if I use: | 2006-07-06 | ||
4 | OK | Some of the <%= are written as <%- and the code doesn’t work. (Chad says: I can’t find any of these) | 2006-07-03 | ||
6 | DEFER | Since you make a note stating to write your own actions for in-place edits, it would be nice to see at least one sample one. I’m having trouble locating a solution for this, and I’m not sure how to return a successful value or a custom error. Another reason I mention this is because if someone uses an in-place edit field and updates it to an empty string, it becomes impossible to edit the field again, since there’s nothing to ‘click’ to activate the edit mode. | |||
80 | ERROR | In the 2nd example of versioning, the one that introduces chapter.revert_to(2), I don’t understand the final version number. The example starts with 3 versions, then revert_to is supposed to add a new version according to the text, and then the title is modified and chapter.save is called. This should then bump up the versions again, so the final chapter.version should be 5. Ok, if that’s not correct, then perhaps you could clarify the explanation a little :-). | |||
338 | TYPO | The price listed for the discounted PDF is wrong. It is shown as $5.00, and it should be $7.50 | 2006-07-03 | ||
53 | ERROR | I’m not sure of the version of the text used in what I saw, because it is the pdf extract for “Rails Without a Database” (I do not currently have an actual copy of the book, or the full pdf). Anyway, on page 53 the example DatabaselessApplication/lib/tasks/clear_database_prerequisites.rake does not really work. If you use the example code given, rake test_units will not run any of your unit tests. The task which actually needs to have its prerequisites cleared is test:units, not test_units. Clearing test_units prereqs causes the unit tests to not be run at all. Here is code I’m using in my database-less rails app to make all the rake test_* tasks work: [:‘test:units’, :‘test:functionals’, :‘test:recent’, :‘test:uncommitted’, :‘test:integration’].each do |name| | |||
134 | ERROR | Your date route is spot-on, except for: “Defaulting to the current day” | |||
283 | TYPO | The code in the book for whitelists doesn’t work. But the new code posted in the resources section: | |||
130 | ERROR | Halfway down the page, you have the simplified signin action. At the bottom of the page, you pring the the entire controller, but the signin method there is missing the “if request.post?” test. | |||
32 | ERROR | “we put relative path to our JavaScript | |||
57 | TYPO | In the final sentence of the first paragraph: should read: right? Thanks. | |||
61 | TYPO | In the second sentence of the second paragraph, “You’d” should not be capitalized. | |||
112 | SUGGEST | Don’t forget to save the changes to the database: | |||
119 | TYPO | look at middle at page: We can now simplify the signin action to look like this: Now look at bottom of page: IMHO, you forget add “if request.post?” in second time. So, user never saw login\\password form and will be receive “Username or password invalid” | |||
139 | ERROR | “if request.post?” is missing in the signin action of the full AdminController code listing (the last code piece on the page). | |||
276 | TYPO | Appendix A - ‘tis’ should be ‘this’ | |||
140 | ERROR | model_class = Object.const_get(table.classify) should be Otherwise you get an error NoMethodError: undefined method `classify’ for :contacts:Symbol if you pass in :contacts as shown in the example | |||
155 | TYPO | Mild grammatical : “We have multiple ways to achieve this affect, …” should that be “effect” ? | |||
296 | ERROR | The code from notifier.rb as it stands doesn’t work in the latest version of Rails because Rails automagically inserts the contents of multipart_alternative first (but without @name resolving) and then inserts the two parts as coded. This can be fixed by renaming multipart_alternative to multipart_alternative_html and altering the render_message accordingly. This whole setup should have been tested on more than one (Mac-based) email agent. Google mail only displays the plain text section; Outlook only displays the HTML section. | |||
173 | ERROR | The setup() method suggested doesn’t appear to work with current Rails (1.2) — namely the last line. An update to this recipe would be nice in future editions. | |||
75 | TYPO | 3rd paragraph: “Now we can find and destroy records by their primary keys:” An example follows which is wrapped in <![[CDATA ]]> tags by mistake. (These tags probably originate from some error in the XML source of the book.) | |||
151 | ERROR | Render CSV Example code gives error: NameError in ExportController#orders Need to add require “CSV” | |||
86 | TYPO | 4th paragraph: " | |||
101 | SUGGEST | I found the GradeFinder example very useful… but it took me a while to figure out how to reuse GradeFinder for the base class. For example, while Student.find(1).grades.below_average works well, I can’t readily use Grades.below_average So, it seems to me, that in order to reuse the GradeFinder logic, I can just write “extend GradeFinder” in the class definition for Grade (just under the “class Grade < ActiveRecord::Base” statement). For a Ruby novice such as myself, it would be nice to have that in your book. | |||
197 | SUGGEST | It would seem to me that Recipe 49: “Dealing with Time Zones” ignores daylight saving time. | |||
13 | SUGGEST | in_place_select_editor is missing some options that are in: See the rdoc for JavaScriptMacrosHelper.html This seems to work: def in_place_select_editor(field_id, options = {}) js_options = {} function << (‘, ’ + options_for_javascript(js_options)) unless js_options.empty? | |||
71 | ERROR | Recipe 19, “Tagging Your Content”, uses a plugin that is no longer available. Attempting to follow the book fails at the first step (script/plugin install acts_as_taggable). The plugin is now considered legacy, as per DHH comment on dev.rubyonrails.org. The book needs to instruct on how to retrieve a legacy plugin, or (preferred) be updated with one of the community-supported tagging systems (agilewebdevelopment.com/plugins/search?search=acts_as_taggable) | |||
287 | 321 | TYPO | A small error in the first sentence in paragraph A.2: The source code in tis book… Maybe right: The source code in this book… | ||
272 | SUGGEST | It should be more clear than “The default generated model, Delivery, is sufficient for our needs on the Ruby side of the house.” that the reader should be running | |||
199 | SUGGEST | If you get an error when calling CGI.rfc1123_date saying “undefined method `gmtime’”, you are probably passing a Date object (instead of the required Time object) as a parameter. Simply use my_date_variable.to_time to convert it to a type that CGI can use. | |||
198 | ERROR | The | |||
149 | TYPO | In the description of the solution, you say that you will use an “after_filter”, but then you actually implement a before_filter. | |||
149 | ERROR | The calculation in def session_expiry: | |||
146 | SUGGEST | Please give page numbers on ALL pages; not putting page numbers on blank pages and on the receipe front pages means that you can go several pages without a page number, making it hard to locate sections from the index. E.g., pages 146-149 have no page numbers. | |||
46 | ERROR | I tried the code, and the class CodeStatistics was not known. So I had to include require ‘code_statistics’ to get it to work. | |||
219 | ERROR | Image#save_fullsize should be using write, not puts to write out the binary data. | |||
228 | TYPO | I couldn’t find this is the errata. In recipe 57 “Processing Uploaded Images”, in Image#save_fullsize, you should be using write, not puts. | |||
1 | SUGGEST | It would be easier to find the samples in the download if they were ordered by Chapter Number. (JMHO) | |||
142 | ERROR | At least using Rails 2.0.2, I get an “unknown table roles_users” message when I run this recipe. I had to add a new migration to rename roles_users to users_roles in order to get the code to execute without errors. So I think that the AddRolesAndRightsTables migration may need an update. | |||
78 | ERROR | script/plugin discover chapter.version As I got the book specifically for acts_as_versioned - I have to say I was quite dissapointed | |||
150 | ERROR | session_expiry() doesn’t invoke the RJS template, this is the error it produces: You called render with invalid options : /application/redirect | |||
87 | TYPO | Instead of “detail.tags.collect..” should the following be “contact.tags.collect..” ? <%= text_field_tag “tag_list”, The partial is called ‘detail’ while the model obj is ‘Contact’ | |||
136 | ERROR | Don’t know is this is Rails 2.x specific, but self.password_salt, self.password_hash = salt, Digest::SHA256.hexdigest(pass+salt) should be self[:password_salt] = salt | |||
55 | Ztdaz | ERROR | good guest page. | ||
243 | ERROR | In the example “SecretURLs/app/models/inbox.rb” the line @attributes[‘access_key’] = MD5.hexdigest((object_id + rand(255)).to_s) should read @attributes[‘access_key’] = Digest::MD5.hexdigest((object_id + rand(255)).to_s) the class also needs to require ‘Digest’ at some point. | |||
13 | ERROR | Scriptaculous in_place_editor does not work with Rails 2.1 as described in the book. | |||
45 | ERROR | Not sure whether the code here is correct in Rails 2.3.x module ApplicationHelper class TabularFormBuilder < ActionView::Helpers::FormBuilder |