[Rails] Agile book deltas

Justin Forder justin at justinforder.me.uk
Mon Jan 2 20:38:13 GMT 2006


Justin Forder wrote:

>> Xavier Noria wrote:
>>
>> How can one figure out what is new in 4.0?
> 
[...]
> 1) there are PDF diff tools available (e.g. at www.softinterface.com)
> 
> 2) there are many PDF to text converters - you could convert to plain 
> text and use a normal diff tool, ignoring whitespace differences
> 
> I haven't tried either of these, but I may once I've got my version 4.0 
> PDF.

Well, I tried the evaluation download of DiffDoc, and I wouldn't 
recommend it to anybody... but after wading through false positives, and 
possibly missing some real differences in the process, this is what I found:

- diagrams in the new PDF are greatly improved by the use of vector 
fonts in place of bitmapped text

- many typos are fixed

- there are improvements in wording or punctuation in a few places, 
without changing the meaning

Places where the meaning has changed are as follows:

p62: validation of the image URL now just checks for a valid suffix; it 
doesn't require the "http:" prefix

p99: text discusses the use of start_form_tag, as well as the shorter 
alternative form_tag (so is consistent with the code)

p131: definition of login has changed, as follows:

@user = User.new(params[:user])
was
@user = User.new(params[:user_id])

and

if logged_in_user
   session[:user_id] = logged_in_user.id
was
if logged_in_user
   session[:user_id] = logged_in_user

p160, in the test.log content,
the shipped_at parameter has value nil, where in the previous
printing it was a date/time starting Mon May 02
and the SQL INSERT has NULL rather than that date

p203, under Reading Existing Rows,
the example has been changed/corrected as follows:

an_order = Order.find(27) # find the order with id == 27
# Get a list of product ids from a form, then
# sum the total price
product_list = params[:product_ids]
total = 0.0
Product.find(product_list).each {|prd| total += prd.total}

used to be

an_order = Order.find(27) # find the order with id == 27
# Get a list of order ids from a form, then
# sum the total value
order_list = params[:order_ids]
orders = Order.find(order_list)
count = orders.size

p221:
(the foreign key will be set to null)
used to be
(the foreign key will be set to zero)

p291:
class OrderController < ApplicationController
used to be
class OrderController < ActiveRecord::Base

p328: The Template Environment
Example changed to show content of session/params/response
rather than content of request/params/response

p337:
textilize() helper
used to be
textile() helper

p340:
def user_list
   @user_pages, @users = paginate(:users, :order => 'name')
end

used to have :order_by rather than :order

p345:
text_field common options - :maxsize corrected to :maxlength

p352:
Finally, we can implement the show action, which displays the comment
and the image.
used to have 'command' instead of 'comment'

p363:
<%= render_component(:controller => 'store', :action => 'cart_summary')  %>
used to be
<%= render_component(:controller => :store, :action => :cart_summary)  %>

p369:
For example, when we edit an article
used to be
For example, when we edit a fragment

p394, bottom:
@content_for_page_scripts  variable
used to be
@contents_for_page_scripts  variable

that's it!

   Justin


More information about the Rails mailing list