{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/791","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project2","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/791/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/791/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/791/events","html_url":"https://github.com/ga-wdi-exercises/project2/issues/791","id":189480849,"number":791,"title":"Another DB Seed Issue","user":{"login":"avalant","id":17132043,"avatar_url":"https://avatars.githubusercontent.com/u/17132043?v=3","gravatar_id":"","url":"https://api.github.com/users/avalant","html_url":"https://github.com/avalant","followers_url":"https://api.github.com/users/avalant/followers","following_url":"https://api.github.com/users/avalant/following{/other_user}","gists_url":"https://api.github.com/users/avalant/gists{/gist_id}","starred_url":"https://api.github.com/users/avalant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avalant/subscriptions","organizations_url":"https://api.github.com/users/avalant/orgs","repos_url":"https://api.github.com/users/avalant/repos","events_url":"https://api.github.com/users/avalant/events{/privacy}","received_events_url":"https://api.github.com/users/avalant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-15T19:17:14Z","updated_at":"2016-11-16T14:09:50Z","closed_at":null,"body":"I removed everything pertaining to \"expertise\" from mentor migration, etc. so that I could create a skill table. I created the following models:\r\n\r\n`user_skill.rb `(join table) , `skill.rb` ,and updated the `mentor.rb` and `mentee.rb` to reflect the has_many relationship between the models.\r\n\r\n`user_skill.rb`:\r\n```ruby\r\nclass UserSkill < ApplicationRecord\r\n  belongs_to :mentor, :mentee, :skill\r\nend\r\n```\r\n\r\n`skill.rb`:\r\n```ruby\r\nclass Skill < ApplicationRecord\r\n  has_many :user_skills\r\n  has_many :mentors, :mentees, through: :user_skills\r\nend\r\n```\r\n\r\n`mentee.rb`:\r\n```ruby\r\nclass Mentee < ApplicationRecord\r\n  belongs_to :user\r\n\r\n  has_many :mentorships\r\n  has_many :mentors, through: :mentorships\r\n\r\n  has_many :user_skills\r\n  has_many :skills, through: :user_skills\r\n\r\n  validates :name, :photo_url, :location, :phone, :email, :profgoals, presence: true\r\nend\r\n```\r\n\r\n`mentor.rb`:\r\n```ruby\r\nclass Mentor < ApplicationRecord\r\n  belongs_to :user\r\n\r\n  has_many :mentorships\r\n  has_many :mentees, through: :mentorships\r\n\r\n  has_many :user_skills\r\n  has_many :skills, through: :user_skills\r\n\r\n  validates :name, :photo_url, :location, :phone, :email, :about, presence: true\r\nend\r\n```\r\n\r\nIn my `db/schema.rb` I have the following:\r\n```ruby\r\ncreate_table \"skills\", force: :cascade do |t|\r\n    t.datetime \"created_at\", null: false\r\n    t.datetime \"updated_at\", null: false\r\n  end\r\n\r\n  create_table \"user_skills\", force: :cascade do |t|\r\n    t.integer  \"mentor_id\"\r\n    t.integer  \"mentee_id\"\r\n    t.datetime \"created_at\", null: false\r\n    t.datetime \"updated_at\", null: false\r\n    t.index [\"mentee_id\"], name: \"index_user_skills_on_mentee_id\", using: :btree\r\n    t.index [\"mentor_id\"], name: \"index_user_skills_on_mentor_id\", using: :btree\r\n  end\r\n```\r\n\r\nthen i created skills in my `seeds.rb`:\r\n\r\n```ruby\r\nskills1 = Skill.create!([{skill: 'Self-Care'}, {skill: 'Web Development'}, {skill: 'Social Justice'}])\r\n```\r\n\r\nand sample into my mentee\r\n\r\n```ruby\r\nmentee1 = Mentee.create!({\r\n  name: 'Sue Mentee',\r\n  photo_url: 'http://clahrc.azurewebsites.net/wp-content/uploads/2014/04/placeholder-02-wide-01.png',\r\n  location: 'Washington DC',\r\n  phone: '123-456-7890',\r\n  email: 'sue@fakeemail.com',\r\n  profgoals: 'Lorem ipsum dolor sit amet, at mea illum minim, te iudico denique omnesque mea, cu sea velit quando voluptatibus. Mei ex omnis iusto, ex quod facilisi his. Nisl sententiae cum te. Sea error philosophia ad, ut sed atqui possim reprimique. Nam id sale errem bonorum, ei melius utamur nominavi nec, mea ad porro dolores. Cu mundi nominati complectitur quo, quo et dicunt atomorum appellantur.',\r\n  skill: skills1.first,\r\n  user_id: 1\r\n})\r\n```\r\n\r\nI need do db create, migrate, and when I go to see my file I received the following:\r\n\r\n`rake aborted!\r\nNoMethodError: undefined method 'arity' for :mentees:Symbol`\r\n\r\nWhat I'm reading about arity confuses me. I did however check my files to see if I set something up wrong with my mentees and everything looks correct to me. But, the error message doesn't lie. I just don't understand.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/comments/260955626","html_url":"https://github.com/ga-wdi-exercises/project2/issues/791#issuecomment-260955626","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/791","id":260955626,"user":{"login":"superbuggy","id":17716232,"avatar_url":"https://avatars.githubusercontent.com/u/17716232?v=3","gravatar_id":"","url":"https://api.github.com/users/superbuggy","html_url":"https://github.com/superbuggy","followers_url":"https://api.github.com/users/superbuggy/followers","following_url":"https://api.github.com/users/superbuggy/following{/other_user}","gists_url":"https://api.github.com/users/superbuggy/gists{/gist_id}","starred_url":"https://api.github.com/users/superbuggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superbuggy/subscriptions","organizations_url":"https://api.github.com/users/superbuggy/orgs","repos_url":"https://api.github.com/users/superbuggy/repos","events_url":"https://api.github.com/users/superbuggy/events{/privacy}","received_events_url":"https://api.github.com/users/superbuggy/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T14:09:50Z","updated_at":"2016-11-16T14:09:50Z","body":"are you still facing this issue? "}}
{"actor":{"display_login":"superbuggy"}}