search for: order_histori

Displaying 2 results from an estimated 2 matches for "order_histori".

Did you mean: order_history
2006 Aug 17
4
Migration newbie
In an migration file there is one up and one down method. Below is from Agile Web Development with Rails: class CreateOrderHistories < ActiveRecord::Migration def self.up create_table :order_histories do |t| t.column :order_id, :integer, :null => false t.column :created_at, :timestamp t.column :notes, :text end end def self.down drop_table :order_histories end end Why is there a drop table in the same file? Will that not delete the same table just created? -- Posted via http://www.ruby-...
2010 Jun 21
14
Controllers, what? why?
Hi, I am starting to learn rails and I went through the guide and a couple of tutorials. Even though I understand controllers or at least I can use them I can''t see yet the whole picture. Why do you need several controllers for a single application? If a controller is just a class whose methods interface with models and views, why not have a single controller for the whole application?