Sunday, September 4, 2011

[Rails] Re: with_options and Rails 3

So I tried using the :as option for the named route so I could have
dashboard_sidebar_path helpers.

scope :path => '/dashboard', :controller => :dashboard do
match '/sidebar.:format' => :sidebar, :as => 'dashboard_sidebar'
match '/charts.:format' => :charts
match '/action_items.:format' => :action_items
match '/performance.:format' => :performance
end

However, strangely enough, it reports this error when using the
dashboard_sidebar_path helper:

No route matches {:controller=>"dashboard", :action=>"sidebar"}


As you can see the controller is defined with :controller in the
scope, so I dont know why the error.

thanks for response

On Aug 31, 5:42 pm, John Merlino <li...@ruby-forum.com> wrote:
> I havent tested it yet but thanks for response
>
> --
> Posted viahttp://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate