Rails routing issue

Posted by Brob on Stack Overflow See other posts from Stack Overflow or by Brob
Published on 2011-01-17T15:46:26Z Indexed on 2011/01/17 15:53 UTC
Read the original article Hit count: 215

Hi I've just started learning rails and been going through some tutorials from learning rails (http://www.buildingwebapps.com/podcasts/79335-putting-the-page-contents-into-the)

The tutorials appear to be Rails v2 and I'm on Rails v3

There is a line in the routes file which appears to be causing a problem

map.view_page ':name', :controller => 'viewer', :action => 'show'

The line works for the front end view i.e. my viewer controller but not for the back end

I get the error

NoMethodError in Viewer#show 

I think this has something to do with the view I am using and the line

<%= @page.body %>

I know it's difficult without the full code but if anyone can help that would be awesome

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3