Created
May 2, 2012 20:08
-
-
Save pvh/2579956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Shogun | |
module Once | |
class OnceRecord < Sequel::Model | |
Sequel.extension :pg_array | |
DB.extend Sequel::Postgres::PGArray::DatabaseMethods | |
unrestrict_primary_key | |
end | |
def self.ever(*arguments, &blk) | |
OnceRecord.create(signature: signature(arguments), arguments: arguments.pg_array) | |
end | |
def self.signature(*arguments) | |
signature = arguments.join(' ') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ERROR: missing dimension value at character 73
STATEMENT: INSERT INTO "once_records" ("signature", "arguments") VALUES ('sample', '["sample"]') RETURNING *