Module: Rambler::Mapper

Extended by:
ActiveSupport::Concern
Included in:
ActionDispatch::Routing::Mapper
Defined in:
lib/rambler/mapper.rb

Instance Method Summary collapse

Instance Method Details

#mount_controller(con) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/rambler/mapper.rb', line 27

def mount_controller(con)

  controller_class = [@scope[:module],"#{con}_controller"].join("/").camelize.constantize
  
  self.controller(con) do
    controller_class.mappings.each do |mapping|
      options = mapping[:options].merge({ :action => mapping[:name] })
      self.match mapping[:path], options
    end
  end
  
end