Skip to content

Commit

Permalink
Merge pull request #5650 from sekrett/master
Browse files Browse the repository at this point in the history
Documentation fix: Change the example for habtm association to use proc according to changelog
  • Loading branch information
vijaydev committed May 4, 2012
2 parents d1729b9 + 0f2555f commit b24f1ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/associations.rb
Expand Up @@ -1596,7 +1596,7 @@ def belongs_to(name, options = {})
# has_and_belongs_to_many :categories, :join_table => "prods_cats" # has_and_belongs_to_many :categories, :join_table => "prods_cats"
# has_and_belongs_to_many :categories, :readonly => true # has_and_belongs_to_many :categories, :readonly => true
# has_and_belongs_to_many :active_projects, :join_table => 'developers_projects', :delete_sql => # has_and_belongs_to_many :active_projects, :join_table => 'developers_projects', :delete_sql =>
# "DELETE FROM developers_projects WHERE active=1 AND developer_id = #{id} AND project_id = #{record.id}" # proc { |record| "DELETE FROM developers_projects WHERE active=1 AND developer_id = #{id} AND project_id = #{record.id}" }
def has_and_belongs_to_many(name, options = {}, &extension) def has_and_belongs_to_many(name, options = {}, &extension)
Builder::HasAndBelongsToMany.build(self, name, options, &extension) Builder::HasAndBelongsToMany.build(self, name, options, &extension)
end end
Expand Down

0 comments on commit b24f1ce

Please sign in to comment.