I have imported a .csv file of 10,000 locations and I need to loop through the database and geocode\_by a few fields rather than the usual "geocode\_by :address"

I am using the geocoder gem. 

My database scheme looks like this

```
    create_table "locations", :force => true do |t|
      t.string   "Address"
      t.string   "City"
      t.string   "State"
      t.string   "Zip"
      t.float    "latitude"
      t.float    "longitude"
      t.datetime "created_at"
      t.datetime "updated_at"
    end 

```

Can I do this in a controller action rather than on validation?
Should I do something like this:

```
 def index
    @locations = Location.all
    @locations.each do |l|
        new_address = "#{l.Address} #{l.City} #{l.State}"
        geocode_by = :new_address
    end
 end

```

But yea, any help is greatly appreciated, thank you!