Active Record is a pattern that combines domain logic with storage abstraction in single object.
I'm writing a model that handles user input from a text area. Following the advice from http://blog.caboo.se/…
ruby-on-rails ruby activerecord modelI want to execute one update raw sql like below: update table set f1=? where f2=? and f3=? This SQL …
ruby-on-rails activerecord rawsqlI have used RESTful techniques to generate a model (in fact, I am using Devise gem, which does that for …
ruby-on-rails activerecord deviseclass Agents << ActiveRecord::Base belongs_to :customer belongs_to :house end class Customer << ActiveRecord::Base has_…
ruby-on-rails activerecord has-many-throughI have a method in rails that is doing something like this: a = Foo.new("bar") a.save b = Foo.…
ruby-on-rails activerecord data-accessI'm try to save a hash mapping ids to a number of attempts in my rails app. My migration to …
ruby-on-rails ruby serialization activerecordI have 3 mysql tables. Table 1 user id | name Table 2 emails id | email Table 3 user_email user_id | email_id I …
php codeigniter activerecord left-joinI am new to Yii-2 framework. How can i achieve following query in Yii-2 framework using activeQuery and models. SELECT * …
php mysql activerecord yii yii2I want to do something like: SELECT * FROM USER WHERE NAME LIKE '%Smith%'; My attempt in Arel: # params[:…
ruby-on-rails activerecord arelI am trying to understand what has_many :through is and when to use it (and how). However, I am …
ruby-on-rails ruby-on-rails-3 activerecord