Sha256: fa8c23e03587227839027bee794a526aa6dc53272f819331ef5bb36a03088c62

Contents?: true

Size: 896 Bytes

Versions: 2

Compression:

Stored size: 896 Bytes

Contents

module Ecm::Staff
  class Routing
    def self.routes(router, options = {})
      options.reverse_merge!(
        { :organisations_actions  => [:index, :show],
          :business_units_actions => [:index, :show],
          :people_actions         => [:index, :show],
        }
      )

      router.resources :ecm_staff_organisations,  :only       => options[:organisations_actions],
                                                  :controller => 'ecm/staff/organisations'
      router.resources :ecm_staff_business_units, :only       => options[:business_units_actions],
                                                  :controller => 'ecm/staff/business_units'
      router.resources :ecm_staff_people,         :only       => options[:people_actions],
                                                  :controller => 'ecm/staff/people'
    end # def
  end # Routing
end # module Ecm::Staff

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecm_staff-0.0.2.pre lib/ecm/staff/routing.rb
ecm_staff-0.0.1.pre lib/ecm/staff/routing.rb