Skip to content

Instantly share code, notes, and snippets.

View sonianand11's full-sized avatar
🌞

Anand Soni sonianand11

🌞
View GitHub Profile
I want to create Task management app. Task has many assignee and one assignor. This is how I have created a association. Getting error of
ActiveRecord::HasManyThroughAssociationNotFoundError: Could not find the association :assignment in model User
class User < ActiveRecord::Base
attr_accessible :name
has_many :assignments,:foreign_key => "assignee_id"
has_many :tasks, :through => :assignment
end
{
"rabbitmq": {
"port": 5672,
"host": "127.0.0.1"
},
"redis": {
"host": "localhost",
"port": 6379
},
"api": {
{
"handlers": {
"graphite": {
"type": "amqp",
"exchange": {
"type": "topic",
"name": "metrics",
"passive": "true"
},
"send_only_check_output": true