Problem with "session" vs. "sessions"
|
|
Got the following msg when I tried to bring up the login screen: “session_url failed to generate from {:action=>”show”, :controller=>”session”} – you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: [“session”, :id] – are they all satisifed?” Did a little googling and found that the problem is that Rails now expects to see “session” instead of “sessions”. (Something about “singular resources”.) Changed all occurrences of “sessions” to “session”. Also changed routes.rb to read “map.resource :session” Note that map.resource (singular) is needed rather than map.resources. After doing this, the login screen came up just fine. |
|
|
Oops, forgot to mention: Ruby 1.8.5, Rails 1.2.5, Linux |
|
|
Tom, Yep that one’s been biting a few people. Rick (creator of that plugin) changed it because a user should only have a single session – not multiple – so this is more technically accurate. So while I understand and agree with the change, it frustrates me because the book used the old format and I hate thinking about other people having problems with it. |