Created
July 4, 2012 16:24
-
-
Save emiltin/3048145 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #routes.rb | |
| RailsOSRM::Application.routes.draw do | |
| scope "(:locale)" | |
| resources(:issues) | |
| end | |
| end | |
| #issues_controler.rb | |
| def test | |
| @issue = Issue.find params[:id] | |
| end | |
| #test.hmtl.erb | |
| <%= link_to 'view', @issue %> | |
| # => | |
| No route matches {:action=>"show", :controller=>"issues", :locale=>#<Issue id: 1, user_id: 32, title: "blue sky", body: "missing", status: nil, comments_count: 1, votes_count: 1, created_at: "2012-06-26 17:36:03", updated_at: "2012-06-26 17:36:03">} | |
| how did an Issue object end up in :locale option to link_to? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment