title: Rails URL for index action includes weird wording for ActiveRecord_Associations
body: <p>I've published a sizable update to my heroku staging site and besides some saving issues (which I'll post in a separate question), I've noticed some weird things happening to my index url.</p>
  
  <p>Projects are nested under users like such:
  <strong>routes.rb</strong></p>
  
  <pre><code>resources :users do
    resources :projects do
      get "cancel", :on =&gt; :member
      post "cancel" =&gt; 'projects#cancel_save', :on =&gt; :member
      get "rate_supplier", :on =&gt; :member
      post "rate_supplier" =&gt; 'projects#rate_suppliers', :on =&gt; :member
    end
  end
  </code></pre>
  
  <p>Originally when I viewed a users projects it displayed correctly as</p>
  
  <p><code>/users/2/projects</code></p>
  
  <p>But now for some reason the url looks as follows: </p>
  
  <p><code>users/2/projects.%23&lt;Project::ActiveRecord_Associations_CollectionProxy:0x007fe577ab9820&gt;</code></p>
  
  <p>I'm not sure why the rest of that stuff is in the url?? And can't find anything online. Help!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The models looks as follows:
  project.rb</p>
  
  <pre><code>class Project &lt; ApplicationRecord
  belongs_to :user, inverse_of: :projects
  belongs_to :budget
  belongs_to :industry
  belongs_to :project_source
  belongs_to :project_status
  belongs_to :project_type, class_name: 'Project_type'
  has_and_belongs_to_many :features, join_table: :projects_features
  has_and_belongs_to_many :addons, join_table: :projects_addons
  
  has_one :project_close_reason
  accepts_nested_attributes_for :project_close_reason
  
  has_one :supplier_rating
  accepts_nested_attributes_for :supplier_rating
  
  scope :open, -&gt; {
      where("project_status_id &lt;=?", 8)
  }
  
  scope :closed, -&gt; {
      where("project_status_id &gt;?", 8)
  }
  
  scope :cancelled, -&gt; {
      where("project_status_id =?", 10)
  }
  
  scope :completed, -&gt; {
      where("project_status_id =?", 9)
  }   
  
  end
  </code></pre>
  
  <p>user.rb</p>
  
  <pre><code>class User &lt; ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
       :recoverable, :rememberable, :trackable
  
  validates :password, :presence =&gt; true,
                   :on =&gt; :create,
                   :format =&gt; {:with =&gt; /\A.*(?=.{8,})(?=.*\d)(?=.*[\@\#\$\%\^\&amp;\+\=]).*\Z/ }
  validates :email, :presence =&gt; true, :uniqueness =&gt; true
  
  has_many :projects, inverse_of: :user
  has_many :businesses, inverse_of: :user
  accepts_nested_attributes_for :projects
  
  def full_name 
      "#{last_name}, #{first_name}"
  end
  
  
  end
  </code></pre>
  
  <p>And here is the link:</p>
  
  <pre><code>&lt;li class="&lt;%= 'active' if params[:controller] == 'projects' %&gt;"&gt;
      &lt;%= link_to user_projects_path(current_user, @projects) do %&gt;
          &lt;i class="fa fa-list" aria-hidden="true"&gt;&lt;/i&gt; Projects
      &lt;% end %&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>And here is the index action in the projects controller</p>
  
  <pre><code>def index
    @title = "Your Projects"
    @projects = current_user.projects
  end
  </code></pre>