Sha256: 613cfcac84601712002ce0d6bc00f001db964707e29a5c1e91de5e74a87b8d57
Contents?: true
Size: 1.01 KB
Versions: 51
Compression:
Stored size: 1.01 KB
Contents
require 'spiderfw/controller/controller' require 'spiderfw/controller/mixins/visual' module Spider class PageController < Controller include Visual include WidgetHelper include HTTPMixin include StaticContent def initialize(request, response, scene=nil) super @widgets = {} end def get_route(path) if (path =~ /^[^:]+:([^:\/]+)[:\/]?(.*)$/) # route to widgets if (@widgets[$1]) return Route.new(:path => path, :dest => @widgets[$1], :action => $2) end elsif (path =~ /_h\/(.+)/) # Route back to home return Route.new(:path => path, :dest => Spider::HomeController, :action => $1) end return super end # # def render(path=nil, scene=nil) # scene ||= @scene # scene[:widgets] = @widgets # super(path, scene) # end # end end
Version data entries
51 entries across 51 versions & 1 rubygems