Learningrails.com problem

I am using Learningrails.com tutorials and I am on lesson 10. I am
having a
few issues:

  1. I cannot find a way to render the HTML tags. The method they used was
    insert in the controller/viewer_controller :
    class ViewerController < ApplicationController
    def show
    @page = Page.find_by_name(params[:name])
    end
    end

and in the views/viewer/show.html.erb:
<%= @pagethe.body > (*i get an error using this syntax,
when
i just input <%= @page > the page works but the HTML tags are still not
rendered)

I end up with a blank page with my layout still intact but no text, not
even the text wrapped in a HTML tag.

  1. I cannot find a way correctly shorten the URL. Their method was to
    insert in the routes.rb : view_page ‘:name’, :controller => ‘viewer’,
    :action => ‘show’. But i keep getting an error "No route matches [GET]
    “/home”

Can someone please help me?

I am using rails 3.0; in the tutorial they are using an older method.

<%= something %>, seems you miss a % @page is passed from controller to
view as it is instance variable, so name should be same

On 23 April 2013 18:48, Kunal P. [email protected] wrote:

‘show’. But i keep getting an error "No route matches [GET] “/home”

Can someone please help me?

I am using rails 3.0; in the tutorial they are using an older method.

In that case you are doomed. To use a tutorial that is for a
different version of rails will lead to endless problems, you will
never know whether a problem you encounter is due to an error you have
made or a difference in rails. You must use the right version of
rails that the tutorial expects, but you should also use a tutorial
that is for rails 3. For example you could try railstutorial.org
which is free to use online.

Colin

there is error of % you can see, first try with scaffold that will help
you
lot

On Thu, Apr 25, 2013 at 11:56 AM, William H.
<[email protected]