Skip to content

Instantly share code, notes, and snippets.

@joshuaclayton
Created August 6, 2008 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuaclayton/4269 to your computer and use it in GitHub Desktop.
Save joshuaclayton/4269 to your computer and use it in GitHub Desktop.
[joshuaclayton ~/Sites/plugins and libraries/github_plugins/mephisto | master]$ rak dispatch_path
app/controllers/account_controller.rb
26| redirect_back_or_default(dispatch_path)
app/controllers/mephisto_controller.rb
8| @dispatch_path = Mephisto::Dispatcher.run(site, params[:path].dup)
9| @dispatch_action = @dispatch_path.shift
10| @section = @dispatch_path.shift
18| # @dispatch_path.first has the headers
19| if @dispatch_path.first.is_a?(Hash)
21| redirect_to @dispatch_path.first[:location], :status=>301
35| @article = @dispatch_path.empty? ? @section.articles.find_by_position : @section.articles.find_by_permalink(@dispatch_path.first)
40| 'article' => @article.to_liquid(:mode => :single, :page => @dispatch_path.empty?))
53| redirect_to dispatch_path(:path => (site.permalink_for(@article)[1..-1].split('/') << 'comments' << @comment.id.to_s), :anchor => @comment.dom_id)
71| year = @dispatch_path.shift
72| month = @dispatch_path.shift
107| @articles = site.articles.find_all_by_tags(@dispatch_path, site.articles_per_page)
108| render_liquid_template_for(:tag, 'articles' => @articles, 'tags' => @dispatch_path)
131| cached_references << (@article = site.articles.find_by_permalink(@dispatch_path.first))
app/views/layouts/application.rhtml
17| <li><strong><%= link_to 'Website', dispatch_path([]) %></strong></li>
test/functional/account_controller_test.rb
57| assert_redirected_to dispatch_path
test/functional/mephisto_controller_test.rb
423| assert_equal expected, assigns(:dispatch_action), "Dispatch action didn't match: #{assigns(:dispatch_path).inspect}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment