Skip to content

Instantly share code, notes, and snippets.

@jescalante
Created October 10, 2012 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jescalante/3868152 to your computer and use it in GitHub Desktop.
Save jescalante/3868152 to your computer and use it in GitHub Desktop.
Trying to use a sequel model without a table
class Foo < Sequel::Model
plugin :timestamps, :create => :created_on, :update => :updated_on
plugin :validation_helpers
many_to_one :user
def initialize(params={}) ... end
def before_save ... end
def after_create ... end
def validate ... end
end
class Bar1 < Foo
self.set_dataset :bar1
...
end
class Bar2 < Foo
self.set_dataset :bar2
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment