No results found in makandra dev.
Best results in other decks
...s assume a Ruby on Rails application “booksandreviews.com” exists with three models: class Book < ActiveRecord::Base belongs_to :author has_many :reviews end class Author < ActiveRecord::Base has_many :books...
class Review < ActiveRecord::Base belongs_to :book end 1. Nested Queries Active Record’s where method returns an instance of ActiveRecord::Relation. These relations can be passed to other...
You can defined the transaction method on any class that inherits from ActiveRecord::Base, and that transaction will open up a single new database connection. 1. Opening database...
...here is that the transaction can be called on any class that inherits from ActiveRecord::Base. Why is that the key? Well, you might remember that we initially started off...