Skip to content

Instantly share code, notes, and snippets.

@oleander
Created June 14, 2011 08:36
Show Gist options
  • Select an option

  • Save oleander/1024528 to your computer and use it in GitHub Desktop.

Select an option

Save oleander/1024528 to your computer and use it in GitHub Desktop.
Book.editable_by(current_user).find_by_identifier(params[:book_id]).image_placements.find(params[:id]).save!
# => ActiveRecord::ReadOnlyRecord Exception: ActiveRecord::ReadOnlyRecord
ir = Book.editable_by(current_user).find_by_identifier(params[:book_id]).image_placements.find(params[:id])
ImagePlacement.find(ir.id).save!
# => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment