Created
December 16, 2011 15:29
-
-
Save hrdwdmrbl/1486463 to your computer and use it in GitHub Desktop.
Digging deeper into array#count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CompanyProfile < ActiveRecord::Base | |
has_many :companies, :through => :companies_company_profiles | |
has_many :companies_company_profiles | |
end | |
class Company < ActiveRecord::Base | |
has_many :company_profiles, :through => :companies_company_profiles | |
has_many :companies_company_profiles | |
end | |
companies = @company_profile.companies | |
#The issue was being investigated because the association record was not being created when I used | |
#@company = @company_profile.companies.build(params[:company]) | |
#@company.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment