@project = current_person.projects.find(params[:id])
Well, when doing so I would get an error:
ActiveRecord::ReadOnlyRecord in ProjectsController#update
I was so frustrated by trying to workaround this issue that I spent the morning researching and playing with DataMapper with the intention of switching.
However, after feeling underwhelmed by the current state of DataMapper on Rails 3, I went back to finding a workaround. Luckily I found this comment at the bottom of a Pragmatic Bookshelf thread:
An other way is to disable readonly like so:
@movies = Movie.find(:all, :readonly => false, :joins => :showings, :conditions =>
["showings.starts_on < ? AND showings.ends_on > ?", Date.today, Date.today])
That did the trick. Why :readonly => false it not the default, I do not understand.