activerecord

Rails 5 belongs_to default behavior  #angularjs #reactjs

  • # 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 .
  • Stack Overflow works best with JavaScript enabled
  • 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

nil

Is there a limit to the number of nested ‘for’ loops?

activerecord

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.