Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created August 8, 2010 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Veejay/514334 to your computer and use it in GitHub Desktop.
Save Veejay/514334 to your computer and use it in GitHub Desktop.
class PhotoCursor < ActiveRecord::Base
acts_as_singleton
# How many photos we're displaying at once in the photo moderation tool
SET_SIZE = 30
def self.get(primary)
message = (primary ? "profile" : "other") + "_photos_cursor"
self.instance.send(message)
end
def self.put(primary, value)
message = (primary ? "profile" : "other") + "_photos_cursor="
self.instance.send(message, value)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment