Errata for Developing Facebook Platform Applications with Rails
We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P1.0,
released about 1 month ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
|
27 |
#36236: In the new method of invitations_controller.rb, a variable is declared as @from_user_id = facebook_session.user.to_s. This is then referenced in new_invitation_url method of fb:req-choice in the new.erb file. However, this is not reflected in the downloadable code for Chapter 2, so it seems that @from_user_id is being declared for no reason.
Also, when invitations are revisited on page 113, the :from parameter referenced in the fb_req_choice method in the now new_attack_path method changed to @user.to_s, and then changes again further down the page to simply current_user without explanation.
I would like to suggest perhaps getting rid of the @from_user_id parameter altogether from page 27 and just reference current_user in the invitation views, so that no confusion results when invitations are revisited later on. --Paul Fioravanti #36236: In the new method of invitations_controller.rb, a variable is declared as @from_user_id = facebook_session.user.to_s. This is then referenced ...more...
|
P1.0
01-Dec-08
|
|
| 36 |
|
#36014: I found it was much easier to install facebooker by installing it from facebooker.rubyforge.org/svn/trunk/facebooker/. No need for git.
--dzengal.com
|
P1.0
20-Nov-08
|
|
|
38 |
#36148: The set_current_user method in app/controllers/application.rb needs to be updated to pass in a second facebook_session parameter otherwise the session_key value in the users table will always be null:
Before:
def set_current_user
self.current_user = User.for(facebook_session.user.to_i)
end
After:
def set_current_user
self.current_user = User.for(facebook_session.user.to_i, facebook_session)
end
This problem is not present in the downloadable code, just in the printed book.--Paul Fioravanti #36148: The set_current_user method in app/controllers/application.rb needs to be updated to pass in a second facebook_session parameter otherwise the ...more...
|
P1.0
26-Nov-08
|
|
| 39 |
|
#34506: Setting up the invitation page, (/app/views/invitations/new.erb) I had to give it an fbml.erb extension instead of just .erb, and then I had to create a 'new' action in my controller to get it to work--Brad Tayan #34506: Setting up the invitation page, (/app/views/invitations/new.erb) I had to give it an fbml.erb extension instead of just .erb, and then I had t ...more...
|
B8.0
15-Sep-08
|
|
| 44 |
|
#36252: <fb:profile-pic uid="<%id%>" /> should be <fb:profile-pic uid"<%user%>" />--Joseph Rork
|
P1.0
02-Dec-08
|
|
| 54 |
|
#36021: With Rails 2.1.2, the purpose of :limit has changed when specifying the length of an integer. Instead of doing :limit => 20, it should be :limit => 8 to specify a bigint type in MySQL.--Aaron Valade #36021: With Rails 2.1.2, the purpose of :limit has changed when specifying the length of an integer. Instead of doing :limit => 20, it should be :li ...more...
|
P1.0
20-Nov-08
|
|
|
81 |
#36237: Refers to 1st paragraph, last sentence:
Once we have created the fb_dashboard with the fb_action and fb_help, since we have a Help and Feedback tab, we are then suggested to delete the help link and action. I can understand the help link deletion, but removing the action means that we don't have any way to get to the invitation pages from the UI. So, I would like to suggest either perhaps a new tab for invitations or just keeping the invitations fb_action under the fb_dashboard. --Paul Fioravanti #36237: Refers to 1st paragraph, last sentence:
Once we have created the fb_dashboard with the fb_action and fb_help, since we have a Help and Feed ...more...
|
P1.0
01-Dec-08
|
|
|
86 |
#36149: This is concerning Footnote 6 on installing will_paginate.
According to errtheblog.com, installing will_paginate by running
script/plugin install svn://errtheblog.com/svn/plugins/will_paginate is "strongly discouraged" (installing this way didn't actually work for me.
The recommended way is apparently script/plugin install git://github.com/mislav/will_paginate.git (installing this way worked for me; just had to make sure not to forget to restart the server).--Paul Fioravanti #36149: This is concerning Footnote 6 on installing will_paginate.
According to errtheblog.com, installing will_paginate by running
script/plugin in ...more...
|
P1.0
26-Nov-08
|
|
|
91 |
#36150: The generate publisher command has apparently changed:
Before:
script/generate publisher attack
After:
script/generate facebook_publisher attack--Paul Fioravanti #36150: The generate publisher command has apparently changed:
Before:
script/generate publisher attack
After:
script/generate facebook_publis ...more...
|
P1.0
26-Nov-08
|
|
|
113 |
#36238: I found that in the code for new.erb the new_attack_path method needs to be substituted for a new_attack_url method otherwise there will be routing errors when an invite is accepted.--Paul Fioravanti #36238: I found that in the code for new.erb the new_attack_path method needs to be substituted for a new_attack_url method otherwise there will be ro ...more...
|
P1.0
01-Dec-08
|
|
|
114 |
#36159: Under the fb_request_form method, there is a fb_request_form_submit method.
This is not needed as the fb_multi_friend_selector method already provides a submit button as well as a skip button (the code in the book renders two submit buttons to screen). It would be needed if the friend selector was just a standard fb_friend_selector.--Paul Fioravanti #36159: Under the fb_request_form method, there is a fb_request_form_submit method.
This is not needed as the fb_multi_friend_selector method already ...more...
|
P1.0
28-Nov-08
|
|
|
115 |
#36209: The line: "Since our partial is for AttackPublisher, I'll put it in app/views/attack_publisher/_profile.erb" initially confused me since the app/views/attack_publisher/ folder is not generated automatically when script/generate facebook_publisher attack is initially run. I went looking for the controller that the views referred to, not remembering having ever created it.
May I suggest either including a note that app/views/attack_publisher/_profile.erb is a new file in a new folder, or better yet, have Facebooker generate the app/views/attack_publisher/ folder when a new facebook_publisher is generated.--Paul Fioravanti #36209: The line: "Since our partial is for AttackPublisher, I'll put it in app/views/attack_publisher/_profile.erb" initially confused me since the a ...more...
|
P1.0
01-Dec-08
|
|
| 127 |
128 |
#35202: You use a method potential_disciples(friend_ids) on page 128, but you never mention defining it in any of the previous sections. it’s also inconsistent with the finished code you provide for chapter 6 because there, you use:
@not_potential_diciples = current_user.friends_with_senseis(friend_ids).map(&:facebook_id)--Chris Ye #35202: You use a method potential_disciples(friend_ids) on page 128, but you never mention defining it in any of the previous sections. it’s also inc ...more...
|
B8.0
13-Oct-08
|
|