Hi,
I know this would be a simple solution to provide for any one of you. I
am new to active record and this is what I have currently done:
require ''rubygems''
require ''active_record''
puts "connecting to db...."
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "localhost",
# :username => "myuser",
:password => "schumi58",
:database => "test"
)
puts "connection established"
ActiveRecord::Schema.define do
drop_table(:testTable)
create_table(:testTable) do |t|
t.column :name, :string
end
end
I am also referring to Active Record''s rdoc but am not able to make out
how to use the insert statement in the above code. Can anyone help me in
using INSERT statement in my code above?
Thanks,
Anukul
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---