Active Record is a pattern that combines domain logic with storage abstraction in single object.
1) I know that it will save associations when autosave: true as per http://railsapi.com/doc/rails-v2.3.8/classes/ActiveRecord/AutosaveAssociation.…
ruby-on-rails activerecord associations has-manyHow do I create a new table, through a rails migration, and add an unique index to it? In the …
ruby-on-rails activerecord ruby-on-rails-4is there a way to get the original value that an ActiveRecord attribute (=the value that was loaded from the …
ruby-on-rails activerecordI take naming pretty seriously, so I think pretty hard about good names for my ActiveRecord models. However, I frequently …
ruby-on-rails ruby-on-rails-3 activerecord ruby-on-rails-3.2 active-record-queryThis may seem like a trivial question, however all of the obvious solutions that I can think of have their …
activerecord yii2 yii2-model yii2-validationI'm having trouble getting a has_many :through association working with Rails 4's strong parameters. I have a model called …
activerecord many-to-many ruby-on-rails-4 strong-parametersI looked around and couldn't find any answers to this. All answers involved counts that did not use a GROUP …
ruby-on-rails activerecord ruby-on-rails-2I'm doing some statics calculation in my product. A user has performed a number of operations, let's say posted comments. …
ruby-on-rails activerecord groupingI have a model called Author. An author has many Articles. Articles have a scope called .published that does: where(…
ruby-on-rails activerecord scope rails-activerecordLet's say I've got 15 user ids in an array called user_ids. If I want to, say, change all of …
ruby-on-rails ruby-on-rails-3 activerecord callback update-all