I am using Learningrails.com tutorials and I am on lesson 10. I am
having a
few issues:
- 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.
- 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.