Skip to main content

Posts

Showing posts with the label multiple-selection list rails agile programming

Agile Programming, Continuation

OK, I said I would continue some other time and if history was any indication, it would have been a long time. But I had the burning urge to say something and my ardent followers were just holding their breath to read it (:-)). I talked about conventions and ignorance. Here is a case in point (and actually this is a really good example of how to do a multiple selection list in Ruby On Rails). Here is how to get started. In a windows command prompt window you type: cd c:\workspaces rails msexample cd msexample ruby script\generate model Movie title:string producer:string ruby script\generate model Category label:string ruby script\generate migration CreateCategoriesMovies Then you edit db\migrate\003_create_categories_movies.rb as follows: class CreateCategoriesMovies < ActiveRecord::Migration def self.up create_table :categories_movies, :id => false do |t| t.column :category_id, :integer t.column :movie_id, :integer end add_index :categories_movies, [:catego...