Skip to content

Instantly share code, notes, and snippets.

View isc's full-sized avatar

Ivan Schneider isc

View GitHub Profile
@isc
isc / gist:7571967
Last active December 28, 2015 22:29
Complete schema parser for Sequel
module Sequel
module Postgres
module DatabaseMethods
def schema_parse_complete opts=OPTS # modification
m = output_identifier_meth(opts[:dataset])
ds = metadata_dataset.select(:pg_attribute__attname___name,
:pg_class__relname, # addition
SQL::Cast.new(:pg_attribute__atttypid, :integer).as(:oid),
SQL::Cast.new(:basetype__oid, :integer).as(:base_oid),
SQL::Function.new(:format_type, :basetype__oid, :pg_type__typtypmod).as(:db_base_type),
@isc
isc / README.markdown
Created March 19, 2012 15:58
A micro gem providing an accordion view helper and a tabs view helper that generate the proper markup for Twitter Bootstrap

Twitter Bootstrap Components Helper

Provides an accordion helper and a tabs helper

In your Gemfile:

gem 'bootstrap-components-helpers', :git => 'git://gist.github.com/2117187.git'

Accordion helper: