The implementation of object-relational mapping (ORM) using the Active Record pattern in the Ruby on Rails framework.
Is there a rails-way way to validate that an actual record is unique and not just a column? For example, …
ruby-on-rails ruby-on-rails-3 validation activerecord rails-activerecordI need to implement fine-grained access control in a Ruby on Rails app. The permissions for individual users are saved …
ruby-on-rails ruby session rails-activerecordWhat is the way in rails to structure sql query to only select certain columns from the database, I have …
ruby-on-rails ruby ruby-on-rails-3 rails-activerecordHere are two sample codes. First one with collect: User.first.gifts.collect(&:id) Second one with pluck: User.…
ruby-on-rails ruby rails-activerecordI've done some reading about how to extend ActiveRecord:Base class so my models would have some special methods. What …
ruby-on-rails extend rails-activerecordI have a list of events that I fetch. I'm trying to include every user associated to this event and …
ruby-on-rails rails-activerecordPlease help me in understanding the :source option of has_one/has_many :through association. The Rails API explanation makes …
ruby-on-rails-3 rails-activerecordI have a Release model with medium and country columns (among others). There should not be releases that share identical …
ruby-on-rails ruby-on-rails-3 ruby-on-rails-4 activerecord rails-activerecordI want to do Model.where('id = ?', [array of values]) How do I accomplish this look up without chaining …
ruby-on-rails rails-activerecordI have a rake task that won't work unless a table exists. I'm working with more than 20 engineers on a …
ruby-on-rails ruby rails-activerecord rails-migrations