Sha256: 0e1648e2a2d56c76b10abad7d909fd11af349005b9eecfa868cd88fce173b1ec

Contents?: true

Size: 476 Bytes

Versions: 10

Compression:

Stored size: 476 Bytes

Contents

Rails.application.routes.draw do
  scope :module => :e9_polls do
    scope :path => :admin, :as => :admin do
      resources :polls, :except => :show, :controller => 'polls'
    end

    resources :polls, :only => :show, :controller => 'polls' do
      member do
        get :results
        put :answer
      end
    end

    # redirect admin show url to edit
    get "/admin/polls/:id", :to => redirect("/admin/polls/%{id}/edit"), :constraints => { :id => /\d+/ }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
e9_polls-1.0.10 config/routes.rb
e9_polls-1.0.9 config/routes.rb
e9_polls-1.0.8 config/routes.rb
e9_polls-1.0.7 config/routes.rb
e9_polls-1.0.6 config/routes.rb
e9_polls-1.0.5 config/routes.rb
e9_polls-1.0.4 config/routes.rb
e9_polls-1.0.3 config/routes.rb
e9_polls-1.0.2 config/routes.rb
e9_polls-1.0.1 config/routes.rb