Sunday, January 24, 2010

Recipe 7: JavaScript Autocompletion

(This post is one of a series that upadates Chad Fowler's Rails Recipes.)

Aside from file naming, this recipe contains is just one anachronism. The code in book_controller.rb uses the non-existent @header variable. It should now read:

  def authors_for_lookup
@authors = Author.find(:all)
render :layout => false, :content_type => 'text/javascript'
end

No comments:

Post a Comment