search for: createschemeswork

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

Did you mean: createschemesworks
2010 Oct 11
8
Nooby Stuck - "has_and_belongs_to_many" relationship
...els, :dependent => :destroy has_and_belongs_to_many :works end Work.rb class Work < ActiveRecord::Base validates :workname, :presence => true belongs_to :user belongs_to :unit has_many :marks has_and_belongs_to_many :schemes end migration for schemes_works class CreateSchemesWorks < ActiveRecord::Migration def self.up create_table :schemes_works, :id => false do |t| t.references :scheme t.references :work end THE ERROR >> scheme = Scheme.last => #<Scheme id: 21, schemename: "another", colour: nil, share: nil, subject_id: nil, user_i...