• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar

FromThePage Blog

Crowdsourcing, transcription and indexing for libraries and archives

  • Home
  • Interviews
  • crowdsourcing
  • how-to
  • Back to FromThePage
  • Collections

Rails 2.0 Gotchas

March 18, 2008 By Ben Brumfield

The deprecation tools for Rails 2.0 are grand, but they really don't tell you everything you need to know. The things that have bitten me so far are:

  • The built-in pagination has been removed from the core framework. Unlike tools like acts_as_list and acts_as_tree, however, there's no obvious plugin that makes the old code work. This is because the old pagination code was really awful: it performed poorly and hid your content from search engines. Fortunately, Sara was able to convert my paginate calls to use the will_paginate plugin pretty easily.
  • Rails Engines, or at least the restful_comments plugin built on top of them, don't seem to work at all. So I've had to disable the comments and proofreading request system I spent November through January building.
  • Rails 2.0 adds some spiffy automated code to prevent cross-site-scripting security holes. For some reason this breaks my cross-controller AJAX calls, so I've had to add

    protect_from_forgery :except => [my old actions]

    to those controllers after getting InvalidAuthenticityToken exceptions.

  • The default session has been changed from a filesystem-based storage engine to one that shoves session data into the browser cookie. So if you're persisting large-ish objects across requests in the session, this will fail. Sadly, basic tests may pass, while serious work will break: I found my bulk page transformation
    code to work fine for 20 pages, but break for 180. The solution for this is to add

    config.action_controller.session_store = :p_store

    in your environment.rb file.

Filed Under: rails

Reader Interactions

Comments

  1. lazyatom says

    March 19, 2008 at 5:51 pm

    A quick google should point you in the right direction about compatibility between Rails 2.0 and the engines plugin: http://rails-engines.org/news/2007/12/11/engines-2-0-ish/

    HTH.

Primary Sidebar

What’s Trending on The FromThePage Blog

  • Classifying the Mistakes We Make When We Transcribe
  • Project Profile: University of Virginia School of…
  • NEH to fund better internationalization and…
  • An Interview with Olivia Carlisle of the State…
  • More Than Round Trip: Using Transcription for…
  • Using FromThePage to Create Descriptive Metadata at…

Recent Client Interviews

An Interview with Julanne Neal of the Queensland State Archives

An Interview with Andrea Meyer of East Hampton Public Library

An Interview with Olivia Carlisle of the State Archives of North Carolina

An Interview with Amber Kuo of the LA County Public Library

An Interview with Meredith McDonough of the Alabama Department of Archives and History

Read More

artificial intelligence crowdsourcing features fromthepage projects handwriting history iiif indexing Indianapolis Indianapolis Children's Museum interview Jennifer Noffze machine learning metadata ocr paleography podcast Ryan White spreadsheet transcription transcription transcription software
Privacy Policy | Terms & Conditions | About Us | Contact Us

Copyright © 2022 · FromThePage.com