{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/501","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project2","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/501/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/501/events","html_url":"https://github.com/ga-wdi-exercises/project2/issues/501","id":142709226,"number":501,"title":"Dont know what went wrong.. think it has something to do with show","user":{"login":"MaxKaye","id":9753582,"avatar_url":"https://avatars.githubusercontent.com/u/9753582?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxKaye","html_url":"https://github.com/MaxKaye","followers_url":"https://api.github.com/users/MaxKaye/followers","following_url":"https://api.github.com/users/MaxKaye/following{/other_user}","gists_url":"https://api.github.com/users/MaxKaye/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxKaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxKaye/subscriptions","organizations_url":"https://api.github.com/users/MaxKaye/orgs","repos_url":"https://api.github.com/users/MaxKaye/repos","events_url":"https://api.github.com/users/MaxKaye/events{/privacy}","received_events_url":"https://api.github.com/users/MaxKaye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2016-03-22T16:48:52Z","updated_at":"2016-03-22T17:22:14Z","closed_at":null,"body":"people_controller.rb\r\n```rb\r\nclass PeopleController < ApplicationController\r\n  def index\r\n\r\n    @email_domain = params[:email_domain] || 'All'\r\n\r\n    # get all people\r\n    @people = Person.all\r\n    # get all the available domain names\r\n    @email_domains = @people.map { |p| p.email.split('@').last }.uniq.sort\r\n    # filter the people based on domain name, when provided\r\n    @people.to_a.select! { |p| p.email.index @email_domain } unless @email_domain == 'All'\r\n  end\r\n\r\n  def show\r\n     @person = Person.find(params[:id])\r\n    #  redirect_to @person\r\n   end\r\n\r\n  def new\r\n  end\r\n\r\n  def create\r\n    #  render plain: params[:article].inspect\r\n    @person = Person.new(person_params)\r\n    @person.save\r\n    redirect_to @person\r\n  end\r\n\r\n  private\r\n  def person_params\r\n    params.require(:person).permit(:title, :text)\r\n  end\r\nend\r\n```\r\n```erb\r\nindex.html.erb\r\n<h2>Contacts</h2>\r\n\r\n<div class='row'>\r\n\r\n  <div class='col-md-9'>\r\n    <table class='table table-striped'>\r\n    <th>First Name</th>\r\n    <th>Last Name</th>\r\n    <th>Age</th>\r\n    <th>Ethnicity</th>\r\n    <th>Origin</th>\r\n    <th>Gender</th>\r\n    <th>Occupation</th>\r\n    <th>Company</th>\r\n    <th>Email</th>\r\n\r\n    <% @people.each do |person| %>\r\n      <tr>\r\n        <td><%= person.first_name %></td>\r\n        <td><%= person.last_name %></td>\r\n        <td><%= person.age %></td>\r\n        <td><%= person.ethnicity %></td>\r\n        <td><%= person.origin %></td>\r\n        <td><%= person.gender %></td>\r\n        <td><%= person.occupation %></td>\r\n        <td><%= person.company %></td>\r\n        <td><%= person.email %></td>\r\n\r\n      </tr>\r\n    <% end %>\r\n    </table>\r\n  </div>\r\n\r\n  <div class='col-md-3'>\r\n    <h3>Filters</h3>\r\n    <h4>By domain</h4>\r\n    <div class='btn-group-vertical'>\r\n      <a href='<%= people_path %>'\r\n        type='button'\r\n        class='btn btn-default\r\n          <%= 'btn-primary btn-active' if @email_domain == 'All' %>\r\n          btn-sm'\r\n        >All</a>\r\n      <% @email_domains.each do |domain| %>\r\n        <a href='/people?email_domain=<%= domain %>'\r\n          type='button'\r\n          class='btn btn-default\r\n          <%= 'btn-primary btn-active' if @email_domain == domain %>\r\n          btn-sm'\r\n          ><%= domain %></a>\r\n      <% end %>\r\n    </div>\r\n  </div>\r\n</div>\r\n```"},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/comments/199915494","html_url":"https://github.com/ga-wdi-exercises/project2/issues/501#issuecomment-199915494","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project2/issues/501","id":199915494,"user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T17:22:14Z","updated_at":"2016-03-22T17:22:14Z","body":"You'll need to DCMS."}}