[Radiant] Core Dev: Page Controller and Page Editor refactorings
Jacob Burkhart
igotimac at gmail.com
Mon Jun 4 12:14:46 CDT 2007
> change the routes file to look something like this:
>
> map.with_options :path_prefix => "admin/" do |admin|
> admin.resources :pages, :snippets, :layouts, :users, :extensions
> end
I tried this for the extensions controller, seems it should be simple
enough right?
commented out the extensions routes and added:
map.with_options :path_prefix => "admin/" do |admin|
admin.resources :extensions
end
and I get:
undefined local variable or method `extension_index_url' for
#<#<Class:0x222df3c>:0x222df14>
It seems in order to be able use named routes, we have to name each
route explicitly:
It seems that the line:
extension.extension_index 'admin/extensions', :action => 'index'
is what makes "extension_index_url" come to life
and
extension.extension_indexwithanothername 'admin/extensions',
:action => 'index'
would make "extension_indexwithanothername_url" come to life.
Thoughts on how to get around this?
More information about the Radiant
mailing list