Sha256: 6ba7bf32996a0aedf029336854ea8938616fd1be53a4ba4a9e36d29200c1ddee
Contents?: true
Size: 757 Bytes
Versions: 2
Compression:
Stored size: 757 Bytes
Contents
# -*- encoding : utf-8 -*- module BlacklightMarc class Routes def initialize(router, options) @router = router @options = options end def draw route_sets.each do |r| self.send(r) end end protected def add_routes &blk @router.instance_exec(@options, &blk) end def route_sets (@options[:only] || default_route_sets) - (@options[:except] || []) end def default_route_sets [:catalog] end module RouteSets def catalog add_routes do |options| # Catalog stuff. get 'catalog/:id/librarian_view', :to => "catalog#librarian_view", :as => "librarian_view_catalog" end end end include RouteSets end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight_marc-0.0.6 | lib/blacklight_marc/routes.rb |
blacklight_marc-0.0.5 | lib/blacklight_marc/routes.rb |