We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use inherited_resources and simple_form gems in my app.
MyApp::Application.routes.draw do filter :locale, :pagination, :exclude => /^\/admin/ resources :categories, :controller => "article/categories" root 'home#index' end
class Article::CategoriesController < ApplicationController inherit_resources end
class Article::Category < ActiveRecord::Base translates :name, :description accepts_nested_attributes_for :translations end
= simple_form_for resource do |f| = f.input :title = f.input :description = f.button :submit
undefined method `article_category_path' for #<#<Class:0x00000002604a30>:0x000000046c86e0>
P.S. I'm using Rails_4
Please, can anyone help me to solve this?
The text was updated successfully, but these errors were encountered:
You might not have a resource defined for 'article_category'
'article_category'
Check your routes with rake routes from the command prompt in your project/app root directory.
rake routes
if this is the case (probably), you can just modify this line in your routes.rb (I took this from your post above) and it should do the trick:
routes.rb
match 'article/categories' => 'article/categories#index', :via => :get, :as => :article_category
I think the problem is that your resource is article_category and your actual URL path is article/categories
article_category
article/categories
Sorry, something went wrong.
No branches or pull requests
I use inherited_resources and simple_form gems in my app.
Routes
my Controller
my Model
Form View
I get this error while loading view form
P.S. I'm using Rails_4
Please, can anyone help me to solve this?
The text was updated successfully, but these errors were encountered: