Active Record

Hi,

I am new to active record and still learning the ropes. Can you help
with the following please?

I have the following code:

class Row < ActiveRecord::Base
end

ActiveRecord::Schema.define do
create_table :Rows do |t|
t.column :Item_guid, :string
t.column :Tags, :string, :limit => 4000
t.column :Path, :string, :limit => 4000
t.column :Comment, :string, :limit => 4000
t.column :Item_Id, :string
t.column :Type, :string
t.column :Kind, :string
t.column :Name, :string
end
end

Row.create( :Item_guid => guid,
:Tags => tags,
:Path => pathname,
:Comment => comment,
:Item_Id => itemid,
:Type => type,
:Kind => kind,
:Name => name
)
end

I delete the table Rows and I change my schema to remove the column
“Name” and adjust my row.create statement accordingly by removing
“:Name => name”, Next time I run the code I get an error message
indicating there is an issue inputting the data into the “Name”
column. I am not sure why it still exists?

If I use a different class (e.g. entry) then the code will run fine.
It is like the old defination of Row still exists after I change it.

Any suggestions\help appreciated.

Thanks
G
,

On Fri, Mar 4, 2011 at 5:28 AM, golcork [email protected] wrote:

If you are using ActiveRecord in Rails or outside in a stand alone app?
If
in Rails, which version of Rails are you using?

B.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs