Hi,
I don’t understand one point with Ruby on Rails :
I have the following migration file :
class Personne < ActiveRecord::Migration
def self.up
Commentaire à enlever si vous avez déjà une table personnes
drop_table :personnes
create_table( :personnes ) {
|p|
p.string :prenom
p.string :nom
p.string :telephone
p.text :adresse
}
end
def self.down
drop_table :personnes
end
end
My model is very simple :
class Personne < ActiveRecord::Base
end
In my controller, I put the following code :
class CarnetController < ApplicationController
def voir
Find all the objet Personne from the table personnes
@personnes = Personne.find(:all)
end
end
And it works, but I don’t understand how Rails can know that the classe
Personne should be mapped to the
personnes table. Where it is stored ?
Txa lot !