- # the connection will do for database-independent bug reports.
- ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Schema.define do create_table :posts, force: true do |t| end create_table :comments, force: true do |t| t.integer :post_id end end class Post < ActiveRecord::Base end class Comment < ActiveRecord::Base belongs_to :post end class BugTest < ActiveSupport::TestCase def test_association_stuff post = Post.create!
- You are not running a Rails 5 app, you are just using ActiveRecord .
- The test fails with current rails master.
You are right, belongs_to is required by default in Rails 5. In your example, you are not running a Rails 5 app, you are just using ActiveRecord.
@ng_real_ninja: Rails 5 belongs_to default behavior #angularjs #reactjs
is required by default in Rails 5. In your example, you are not running a Rails 5 app, you are just using
Is there a limit to the number of nested ‘for’ loops?