search for: createmetergroup

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

Did you mean: createmetergroups
2010 Aug 18
6
Once I added this HABTM, one of my 'through' relationships, on a non-habtm model, seems to have broke?
...:Base belongs_to :user, :foreign_key => "user_id" has_and_belongs_to_many :meters end class Meter < ActiveRecord::Base has_and_belongs_to_many :meter_groups belongs_to :user, :foreign_key => "user_id" end #Migrations (removed some cols and drop section) class CreateMeterGroups < ActiveRecord::Migration def self.up create_table :meter_groups do |t| t.string :name t.string :description t.integer :user_id t.timestamps end end end class CreateMeters < ActiveRecord::Migration def self.up create_table :meters do |t| t.in...