0

I'm implementing a system for serving static pages in a rails app with the following controller:

class PagesController < ApplicationController
  def about
    render 'pages/about'
  end
end

I've got the routes set up as follows:

get 'about', to: 'pages#about', as: :about

I can visit www.example.com/about and it properly renders the about content, but if I try to use the about_path helper with link_to anywhere in my views I get an undefined method error on about_path. Raking my routes returns "about GET /about(.:format) pages#about"

Anyone have any idea why this helper isn't registering?

4

1 回答 1

0

这是与 Spree 集成导致的问题。下面的链接提供了两种可行的解决方案。

为 Rails 的 Spree 电子商务添加路由

于 2013-09-22T03:29:55.563 回答