Hi,
I’m completely new to ruby and working my way through the tutorial on
I’ve made a few pages to use, but when I open them in a web browser all
I see is code.
For instance, my new.html.erb, the code of which is:
Add new book
<% form_tag :action => 'create' do %>Title: <%= text_field 'book', 'title' %>
Price: <%= text_field 'book', 'price' %>
Subject: <%= collection_select(:book,:subject_id,@subjects,:id,:name) %>
Description
<%= submit_tag "Create" %>
<% end %>
<%= link_to 'Back', {:action => 'list'} %>
shows up as:
Add new book
<% form_tag :action => ‘create’ do %>
Title: <%= text_field ‘book’, ‘title’ %>
Price: <%= text_field ‘book’, ‘price’ %>
Subject: <%= collection_select(:book,:subject_id,@subjects,:id,:name) %>
Description
<%= submit_tag “Create” %> <% end %> <%= link_to ‘Back’, {:action =>
‘list’} %>
I thought maybe I should be pointing my browser to /new instead of
/new.html.erb, but all I get for that is a 404 error.
I feel like there’s something simple I’m overlooking here, but I haven’t
been able to find a solution anywhere online.
