The implementation of object-relational mapping (ORM) using the Active Record pattern in the Ruby on Rails framework.
a rails console output looks like this: User.all => [#<User id: 1, name: "Michael Hartl", email: "[email protected]", …
ruby-on-rails rails-activerecordRails 4 has introduced a deprecation warning when using :uniq => true with has_many :through. For example: has_many :donors, :…
ruby-on-rails activerecord rails-activerecord ruby-on-rails-4I want to obtain an array of ActiveRecord objects given an array of ids. I assumed that Object.find([5,2,3]) Would …
ruby-on-rails sqlite activerecord find rails-activerecordI know there are 3 main notations for supplying arguments to the where ActiveRecord method: Pure String Array Hash Specifying and …
ruby-on-rails ruby-on-rails-4 activerecord rails-activerecord ruby-on-rails-5I'm new to Rails and was following Ryan Bate's tutorial on how to make a simple authentication system (http://railscasts.…
ruby-on-rails authentication ruby-on-rails-3.2 rails-activerecord railscastsI was following the screencast on rubyonrails.org (creating the blog). I have following models: comment.rb class Comment < …
ruby-on-rails rails-activerecord database-relationsWhat does the first_or_create / first_or_create! method do in Rails? According to the documentation, the method "has …
ruby-on-rails ruby activerecord rails-activerecordIf there is a way I can validate single attribute in Rails? Something like: ac_object.valid?(attribute_name) I'm …
ruby-on-rails validation rails-activerecordHow do I create a migration with two fields that reference the same table? I have tables A, and image. …
ruby-on-rails ruby rails-activerecord rails-migrationsI have a table: people with a column named: age. How can I get a count of the people with …
ruby-on-rails rails-activerecord