Active record save not working

Code :

task :removesign do

ActiveRecord::Base.establish_connection(
:adapter => ‘postgis’,
:database => ‘’,
:username => ‘postgres’,
:password => '
*’,
:host => ‘localhost’)

class Polygon < ActiveRecord::Base
end
Polygon.all.each do |poly|
poly.Cname.gsub!(’-’, ’ ')
puts poly.Cname
poly.save
end
end

Everything works…But when I check the database nothing has
changed???

Tried save and save! to no avail…

Anybody has an idea what went wrong?

Thanks

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