I have created a form useing form_for -
= form_for @category, url: url_for(:controller => 'admin/category',:action => new_record ? "create" : "update"), name: 'udfFieldForm', id: 'udfFieldForm',:method =>'POST', remote: true do |f|
controller is look like-
class Admin::CategoryController < ApplicationController
def create
end
def update
end
end
route defined as -
namespace :admin do
get 'category/:action' => 'category#index', :as => :category
resource :categories
end
When i have submit form it through an error like -
AbstractController::ActionNotFound (The action 'category' could not be found for AdminController):
Here category is a controller under admin directory but it's looking for category action in admin controller. here i want to call category controler.
Please help me , where is the issue?
Need To Update Routes Like as with in admin namesapce