Active Record is a pattern that combines domain logic with storage abstraction in single object.
I have a Rails 3 project. With Rails 3 came Arel and the ability to reuse one scope to build another. I …
ruby-on-rails activerecord ruby-on-rails-3 named-scope arelHow can I check if an ActiveRecord object is new or is already persisted?
ruby-on-rails activerecordI know that you can ask ActiveRecord to list tables in console using: ActiveRecord::Base.connection.tables Is there a …
sql ruby-on-rails ruby-on-rails-3 activerecordI would like to see the SQL statement that a given ActiveRecord Query will generate. I recognize I can get …
sql ruby-on-rails activerecordHow to do UNION query with PHP CodeIgniter framework's active record query format?
mysql sql codeigniter activerecord unionI have an array of objects, let's call it an Indicator. I want to run Indicator class methods (those of …
ruby-on-rails ruby activerecordIf I have a scope with a lambda and it takes an argument, depending on the value of the argument, …
ruby-on-rails activerecord relationI've written a couple of complex queries (at least to me) with Ruby on Rail's query interface: watched_news_posts = …
ruby-on-rails activerecord union active-relationI would like to have a list of all attribute names that can be mass assigned. I need this for …
ruby-on-rails activerecordI have a particularly complex model with validations and callbacks defined. The business needs now calls for a particular scenario …
ruby-on-rails ruby-on-rails-3 activerecord