Permalink
Browse files

It takes 4 spaces or some backticks to have this code displayed as co…

…de in the changelog.
  • Loading branch information...
1 parent 37e6201 commit cab2df7b26946c8cdcae2ba269fdaa257c454190 @Empact Empact committed Jun 18, 2013
Showing with 23 additions and 23 deletions.
  1. +23 −23 activerecord/CHANGELOG.md
View
46 activerecord/CHANGELOG.md
@@ -11,33 +11,33 @@
* Ambiguous reflections are on :through relationships are no longer supported.
For example, you need to change this:
- class Author < ActiveRecord::Base
- has_many :posts
- has_many :taggings, :through => :posts
- end
+ class Author < ActiveRecord::Base
+ has_many :posts
+ has_many :taggings, :through => :posts
+ end
- class Post < ActiveRecord::Base
- has_one :tagging
- has_many :taggings
- end
+ class Post < ActiveRecord::Base
+ has_one :tagging
+ has_many :taggings
+ end
- class Tagging < ActiveRecord::Base
- end
+ class Tagging < ActiveRecord::Base
+ end
To this:
- class Author < ActiveRecord::Base
- has_many :posts
- has_many :taggings, :through => :posts, :source => :tagging
- end
+ class Author < ActiveRecord::Base
+ has_many :posts
+ has_many :taggings, :through => :posts, :source => :tagging
+ end
- class Post < ActiveRecord::Base
- has_one :tagging
- has_many :taggings
- end
+ class Post < ActiveRecord::Base
+ has_one :tagging
+ has_many :taggings
+ end
- class Tagging < ActiveRecord::Base
- end
+ class Tagging < ActiveRecord::Base
+ end
* Remove column restrictions for `count`, let the database raise if the SQL is
invalid. The previous behavior was untested and surprising for the user.
@@ -70,9 +70,9 @@
You can turn off the automatic detection of inverse associations by setting
the `:inverse_of` option to `false` like so:
- class Taggable < ActiveRecord::Base
- belongs_to :tag, inverse_of: false
- end
+ class Taggable < ActiveRecord::Base
+ belongs_to :tag, inverse_of: false
+ end
*John Wang*

0 comments on commit cab2df7

Please sign in to comment.