Active Record is a pattern that combines domain logic with storage abstraction in single object.
I'm using Rails3, ActiveRecord Just wondering how can I chain the scopes with OR statements rather than AND. e.g. …
ruby-on-rails ruby-on-rails-3 activerecord rails-activerecordI have an ActiveRecord result of a find operation: tasks_records = TaskStoreStatus.find( :all, :select => "task_id, store_name, …
arrays activerecord hashHow do I use the created_at field to get only the records that were created today and no other …
mysql date activerecord where laravel-5.1Given the following associations, I need to reference the Question that a Choice is attached through from the Choice model. …
ruby-on-rails ruby-on-rails-3 activerecordIs there a way that you can get a collection of all of the Models in your Rails app? Basically, …
ruby-on-rails activerecord collections modelI am looking for the best approach to delete records from a table. For instance, I have a user whose …
ruby-on-rails ruby database activerecordThere is a handy dynamic attribute in active-record called find_or_create_by: Model.find_or_create_by_<attribute&…
ruby-on-rails activerecord model many-to-many dynamic-attributesI am finding it difficult to easily see what attributes/properties exist on all of my model classes since they …
ruby-on-rails activerecordSo I perform a query to the db and I have a complete array of objects: @attachments = Job.find(1).attachments …
ruby-on-rails activerecordI have a class called CachedObject that stores generic serialised objects indexed by key. I want this class to implement …
ruby-on-rails activerecord