Skip to content

Instantly share code, notes, and snippets.

@hemantborole
Created January 1, 2011 16:45
Show Gist options
  • Save hemantborole/761840 to your computer and use it in GitHub Desktop.
Save hemantborole/761840 to your computer and use it in GitHub Desktop.
Code for activerecord-sqlserver-adapter
class TabMI < ActiveRecord::Base
establish_connection MyDB
set_table_name 'tab'
set_primary_key 'tabid'
def taber(tabid)
tabinfo = TabMI.where(:tabid => tabid).first
puts "=============== Existing attr text #{tabinfo['ATTR_TEXT']}===============" ## Works perfect.
puts "=============== setting attr text to new attr==============="
tabinfo['ATTR_TEXT'] = "New Attr"
tabinfo.save!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment