Skip to content

Instantly share code, notes, and snippets.

@luizcarvalho
Created March 13, 2009 14:38
Show Gist options
  • Save luizcarvalho/78583 to your computer and use it in GitHub Desktop.
Save luizcarvalho/78583 to your computer and use it in GitHub Desktop.
@res = ActiveRecord::Base.establish_connection(:password=>"xxx", :port=>5432, :username=>"postgres", :adapter=>"postgresql", :encoding=>"utf8", :min_messages=>"warning", :database=>"transat", :host=>"000.000.000.000")
con = ActiveRecord::Base.connection
attrs = con.columns("tr_veiculo")
attrs.each do |attr|
puts attr.name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment