The implementation of object-relational mapping (ORM) using the Active Record pattern in the Ruby on Rails framework.
I have the following SQL which I need to do CREATE TABLE cars_users2 AS SELECT DISTINCT * FROM cars_users; …
sql postgresql ruby-on-rails-3 migration rails-activerecordHow can I merge two arrays? Something like this: @movie = Movie.first() @options = Movie.order("RANDOM()").first(3).merge(@movie) But …
ruby-on-rails ruby ruby-on-rails-4 orm rails-activerecordI have a schema like this. managers has_many :emails has_many :stores emails belongs_to :manager stores belongs_to :…
ruby-on-rails-4 rails-activerecord active-record-queryHow do you roll back a failed rails migration? I would expect that rake db:rollback would undo the failed …
mysql ruby-on-rails rails-activerecord rails-migrationsI'm newbie to Rails. I have two models Category and Product as follows:- class Category < ActiveRecord::Base attr_…
ruby-on-rails inheritance rails-activerecordI have a ActiveRecord query for example like this: @result = stuff.limit(10) where stuff is a active record query with …
ruby-on-rails ruby-on-rails-3.2 rails-activerecordI 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-activerecordI'm having a problem deploying my Rails app to Heroku, where this error is thrown when trying to access the …
ruby-on-rails postgresql heroku rails-activerecordn00b question. I'm trying to loop through every User record in my database. The pseudo code might look a …
ruby-on-rails database loops rails-activerecordI have a User model in a Rails application which has an email field. Is there a default validation that …
ruby-on-rails rails-activerecord