PiRSquared17 / activescaffold

Automatically exported from code.google.com/p/activescaffold
MIT License
0 stars 0 forks source link

Nested routes don't seem to get used in generation of the Create links #698

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use restful routing and nest a route, eg:
  map.resources :heading, :active_scaffold => true do |heading|
    heading.resources :subheading, :active_scaffold => true
  end

2. Rake routes, and you'll see that the route to create a new subheading is of 
the form: /headings/:heading_id/subheadings/new

3. In the active_scaffold block of the subheadings_controller.rb, add a nested 
config:

  config.nested.add_link("Heading's subheadings", [:subheadings])

  and make sure that the model files for heading.rb and subheading.rb have a belongs_to :heading and has_many :subheadings

4. Run script/server

What is the expected output? What do you see instead?

In the nested view that gets rendered, there is a 'Create' link to create a new 
subheading. The URL for that should be restful, but is not.

What version (or revision) of the product are you using?

1.2RC1

If this bug causes an exception, please paste at least the first 20 lines below.

Original issue reported on code.google.com by merul.pa...@gmail.com on 4 Sep 2009 at 11:01

GoogleCodeExporter commented 9 years ago
I'm working in remove render_component for nested scaffolds, and it will use 
nested
routes. Currently it's on experimental branch, it's mostly finished but needs 
more
testing

Original comment by sergio.c...@gmail.com on 7 Sep 2009 at 7:16

GoogleCodeExporter commented 9 years ago

Original comment by sergio.c...@gmail.com on 27 Oct 2009 at 4:45