Hi
First of all is there an activerecord tutorial available anywhere?
Tutorial as in
' Lets do this app with all these cases of table relations and
map it to ActiveRecord for SQLite|Mysql'.
I have a table Orders as
'create table Orders (id int primary key not null,order_desc varchar(50));'
in sqlite.
I am getting an error message( 'id shouldn't be null') when I try the following.
require 'active_record'
require 'sqlite'
ActiveRecord::Base.establish_connection(
:adapter=>'sqlite',
:dbfile=>'c:\sqlite\test_dbs\data_test.db')
class Order < ActiveRecord::Base; end
o=Order.new('order_desc'=>'test')
o.save
I get the error message even when i try
o=Order.new('order_desc'=>'test','id'=>10)
instead.
Any clues?
Thanks
PS IDs declared like that in sqlite are autoincremental