Rails routing url name helpers
What basic settings are required to make sure routing url name helpers work?
For instance in my route I have the following:
Blog::Application.routes.draw do resources :news, :as => :news_items, :controller => :news_items, :only => [:show, :index] scope :module => "refinery" do scope(:path => 'refinery', :as => 'admin', :module => 'Admin') do resources :news, :except => :show, :as => :news_items, :controller => :news_items end end end
but the following doesn't seem to work:
I keep on getting the error
undefined local variable or method `new_refinery_news_url'
So I'm pretty sure something is missing in the way I have configured my application, who's main routing is in the RefineryCMS gem which was added in the Gemfile.
Had to use main_app.new_refinery_news_url instead.