2

Currently I have these routes in my routes.rb file:

get 'exit' => 'sessions#destroy', :as => 'logout'
get 'enter' => 'sessions#new', :as => '
get 'register' => 'users#new', :as => '
get 'posts' => 'posts#new', :as => '
get 'offers' => 'offers#index', :as => 'offers'

Since Forem (https://github.com/radar/forem) is asking me: # We ask that you don't use the :as option here, as Forem relies on it being the default of 'forem'.

What is the best way to refactor my routes, so they would match Forem requests, to avoid using :as?

Ivan Kutsarov
  • 983
  • 1
  • 7
  • 14
  • You don't have to use the `:as =>` syntax. I.e. in your first route, if you don't use `:as` to generate logout_path, the default would be exit_path. So please i would like someone to correct me if i'm wrong, but i really don't see MUCH usage of the `:as` syntax. Maybe in nested routes I could see the usage. Thnx upfront for answering, and thanx Ivan for asking this question. – Zippie Mar 10 '13 at 20:18

1 Answers1

0

Maybe this helps: match 'name_you_want' => redirect('ControllerName#action_name')

sergio.s
  • 103
  • 11