Tuesday, June 3, 2008

operate existed tables in rails

Just need specify table name and primary key in Model. All attribution in tables will appear automatically.
class ModelName < ActiveRecord::Base
self.table_name = "table_name"
self.primary_key = "primary_key"
end


 

No comments: