I\'m on Rails 2.3.5. Inside my application a user could book one or more time slots for a specific day. I\'ve defined this named_scope in my Slot model:
Forgive me if I\'ve got my terminology wrong; I am still quite new to Ruby and Rails. For school I am working on an RoR project as part of a team. I was pair programming with a teammate, who actually
I have this schema: class Comment has_many :ratings, :as => :target end class Rating belongs_to :target, :polymorphic => true
I would 开发者_如何学JAVAlike to have a named_scope for blogs with zero posts. The following does not work.
I have a model which has a field called deleted, which is used to mark those deleted items. So normally I would just want to query those having deleted = false items, and in some special cases to lis
Here is the setup: end_date = DateTime.parse(\'2010-01-01 12:00:00-04\') and sometimes it\'s initialized:
I have two models, Project and Category, which have a many-to-many relationship between them. The Project model is very simple:
I have a Model which I am using to track permissions in a hierarchical organization using the awesome_nested_set plugin. I\'m running into a problem where two named_scopes, when chained together, are
PROBLEM: I want to run a query which would trigger something like select * from users where code in (1,2,4);
Two models (Rails 2.3.8): User; username & disabled properties; User has_one :profile Profile; full_name & hidden properties