has-many
In many-to-many through a join table, is has_many / through optional?
I have 3 models: Customers, Stores, Signups (a mailing list) (Signups are their own object since they have state like opted in, opted out, blacklisted, etc)[详细]
2023-02-15 17:25 分类:问答Rails 3: Order a query that uses a has_many and belongs_to association in one query
In my Rails db 开发者_如何学JAVAscheme there is the following structure: tasks has many jobs jobs belongs to one category[详细]
2023-02-14 14:18 分类:问答inheriting scope from a has_many relationship
I am using ruby on rails 3.1 and have 2 models, an event and a group. Each event has_many groups, but has to have at least one \"master\" group, where the column :is_master => true[详细]
2023-02-13 18:09 分类:问答Rails private message system
Hey, I\'m trying to implement a message system as used in social networks. The problem I\'m facing is first about the database structure and second how to implement it in rails.[详细]
2023-02-13 07:30 分类:问答Why is my user_id nil?
def destroy @dignity.destroy end Sorry, that\'s not code, that\'s just how I feel right now.I know there are a ton of beginner questions on Devise, I think I looked at almost every single one.[详细]
2023-02-11 05:29 分类:问答Self-Referencing HasMany Relationship in Fluent NHibernate and MVC3
I have a Word model for a dictionary/thesaurus: public class Word { public virtual string Text { get; set; }[详细]
2023-02-10 15:33 分类:问答Ruby on Rails: Search on has_many association with inner join and other conditions
I\'ve been searching for this for a long time now, and I can\'t get to find the answer anywhere. What I have is a basic search function to find houses, everything works, and till so far the main piece[详细]
2023-02-09 12:03 分类:问答Rails: Issue with multi-level has_many and undefined method
I\'m getting an undefined method \'answers\' error with this: @survey.questions.answers Just running @survey.questions works as you\'d expect.开发者_JS百科[详细]
2023-02-08 09:25 分类:问答Fields for a record in a 'has many' association inside a form
I have a Topic that has many Posts. When a topic is created, it creates the first post along with it.[详细]
2023-02-07 03:56 分类:问答Many to many database
This is probably basic stuff, but I really made my homework looking it up. I still can´t find the solution.[详细]
2023-02-06 18:16 分类:问答