Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'active_record'
- require 'sinatra'
- # connect to the database
- ActiveRecord::Base.establish_connection({
- :adapter => "odbc",
- :dsn => "iSeries",
- :username => "myuname",
- :password => "mypass"
- })
- # define our models
- class SubscriberMasterStjoe < ActiveRecord::Base
- end
- get '/:callerid' do
- subscriber = SubscriberMasterStjoe.find(:first, :conditions =>
- ["STJOEDTA.SUBSMSTR.SUPHON = ?", params[:callerid]])
- subscriber.to_xml(:root => "subscriber-community", :only => [:succde])
- end
Add Comment
Please, Sign In to add comment