My Route
scope :module => "group" do
resources :groups do
resources :topics
end
end
My model
class Post < ActiveRecord::Base
belongs_to :group
end
class Group < ActiveRecord::Base
has_many :posts
end
class Group::Topic < Post
end
My form:
<%= simple_form_for [@current_group, @topic], :html => {:id => "post_form", :class => 'form-horizontal'} do |f| -%>
end
The error message is
undefined method `group_group_topics_path’ for
I don’t think the case is in
simple_form. Most likely you have an error in your routes and they should be updated as follows:Then you will get
group_group_topics_pathroute working. To see all the topics routes type this command in the console:rake routes | grep 'topics'.