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

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.

Any thoughts?


Had to use main_app.new_refinery_news_url instead.

Need Your Help

UIButton firing selector inconsistantly

objective-c ios xcode cocoa-touch

I have a UIButton linked up in IB correctly(I believe). The button fires inconsistently, every time I reload the view to show updated info, the button works sometimes and sometimes does not.It give...

How to create a MySQL stored procedure from PHP?

php mysql stored-procedures

My attempts to query MySQL from PHP with a create statement of a store procedure (SP) have all failed. Is this not possible ?