search for: last_renewal_on

Displaying 1 result from an estimated 1 matches for "last_renewal_on".

2006 Apr 11
3
Validations and has_many :through (Join Models)
...he Relationship Iteself Has Data". Here are the tables: create_table :magazines do |t| t.column :title, :string end create_table :readers do |t| t.column :name, :string end create_table :subscriptions do |t| t.column :reader_id, :integer t.column :magazine_id, :integer t.column :last_renewal_on, :date t.column :length_in_issues, :integer end And here are the models: class Subscription < ActiveRecord::Base belongs_to :reader belongs_to :magazine end class Reader < ActiveRecord::Base has_many :subscriptions has_many :magazines, :through => :subscriptions end class Mag...