dimanche 7 février 2016

Namespace Route MissingTemplate Error

I've checked 9 similar questions on this topic an none of them have helped. All the files are there.

You can see in the photo, I have a views template in views/admin/access/index.hmtl.erb and yet I'm getting an error saying it doesn't exist. admin/settings/index is also not found. What could be going on?

Apologies in advance if this is a very simple mistake. I'd be so grateful for any help on this.

Exceptions:

ActionView::MissingTemplate:

   Missing template admin/settings/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}


ActionView::MissingTemplate:

   Missing template admin/access/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}

Setting controller:

class Admin::SettingsController < ApplicationController

  def index

  end

Access Controller:

class Admin::AccessController < ApplicationController

  def index

  end

Routes (though shouldn't matter):

  namespace :admin do 
    resources :access, only: [:index, :update]
    resources :settings, only: [:index, :update]
  end

Aucun commentaire:

Enregistrer un commentaire