title: NameError - uninitialized constant
body: <p>I'm using Ruby on Rails 4 and my project is about an HR App. An employee can create a leave request through his profile page BUT instead I create the form in his profile page, I only wanted to create a link_to the requests controller BUT I've got this error:</p>
  
  <pre><code>NameError in Employees#show Showing /home/user/workspace/hrapp/app/views/employees/show.html.erb where line #50 raised:
  
  uninitialized constant Requests’
  
  Extracted source (around line #50):
  
  48 &lt;/p&gt;
  49 &lt;%= link_to 'Edit', edit_employee_path(@employee) %&gt; 
  50 &lt;%= link_to ‘My Annual Leave Requests’, controller:'requests' %&gt;
  51 &lt;%= link_to 'Back', employees_path %&gt;  
  </code></pre>
  
  <p>AND I tried this solution: <a href="https://hackhands.com/rails-nameerror-uninitialized-constant-class-solution/" rel="nofollow">https://hackhands.com/rails-nameerror-uninitialized-constant-class-solution/</a></p>
  
  <p>BUT it didn't work and I didn't find a generic answer for this error.</p>
  
  <p>Here is the rake routes:</p>
  
  <pre><code>user@snf-34155:~/workspace/hrapp$ rake routes
             Prefix Verb   URI Pattern                                         Controller#Action
  employee_requests GET    /employees/:employee_id/requests(.:format)          requests#index
                    POST   /employees/:employee_id/requests(.:format)          requests#create
                    PUT    /employees/:employee_id/requests/:id(.:format)      requests#update
                    DELETE /employees/:employee_id/requests/:id(.:format)      requests#destroy
          employees GET    /employees(.:format)                                employees#index
                    POST   /employees(.:format)                                employees#create
       new_employee GET    /employees/new(.:format)                            employees#new
      edit_employee GET    /employees/:id/edit(.:format)                       employees#edit
           employee GET    /employees/:id(.:format)                            employees#show
                    PATCH  /employees/:id(.:format)                            employees#update
                    PUT    /employees/:id(.:format)                            employees#update
                    DELETE /employees/:id(.:format)                            employees#destroy
               root GET    /                                                   welcome#index
  </code></pre>
  
  <p>I think I just need to write the right route but I tried few of them and it didn't work anyway.</p>
  
  <p>Please, can anybody help?</p>
  
  <p>Thanks in advance :) </p>
  
  <p><strong>app/controllers/requests_controller.rb</strong></p>
  
  <pre><code>class RequestsController &lt; ApplicationController
  def index
    @employee = Employee.find(params[:employee_id])
    @request = @employee.requests.all
  end
  
  def show
    @employee = Employee.find(params[:employee_id])
    @request = @employee.requests.find(params[:id])
  end
  
  def new
    @employee = Employee.find(params[:employee_id])
    @request = @employee.requests.new
  end
  
   def create
      @employee = Employee.find(params[:employee_id])
      @request = @employee.requests.create(request_params)
      redirect_to show_employee_path(@employee)
    end
  
    def destroy
      @employee = Employee.find(params[:employee_id])
      @request = @employee.requests.find(params[:id])
      @request.destroy
      redirect_to show_employee_path(@employee)
    end
  
    private
      def request_params
        params.require(:request).permit(:start_date, :end_date, :considerations)
      end
  end
  </code></pre>