Hostpay - Noob with Ruby, having lots of trouble finding help

Hello,
I am trying to edit my html file (which uses Ruby) to change the format
into a table. The default layout is a top-down view. Ruby is
completely new to me although I have been using HTML for around 6 years.

I want it displayed in a table (where I can also add a background and
styling). I have tried all sorts of methods but I can not get it to work
(the page displays an internal error with no explanation)

From what the advice says in the file, this should work (but doesn't);

<table><tbody><tr>
  <% hosting_products.each do | product | %>
    <td>
      <h4><%= product.name.html %></h4>
      <p><%= product.description %></p>
      <%# Other parts go here %>
    </td>
  <% end %>
</tr></tbody></table>

Where the following code is "<%# Other parts go here %>";

<input type='hidden' name='base_renewal_period-<%= i %>'
value="<%= product.base_renewal_period %>" />
<input type='hidden' name='quoted_unit_price-<%= i %>' value="<%=
billing.price(product.unit_price) %>" />
<p><input type='radio' name='add-product' value='<%=
product.specific_type.html %>:<%= i
%>:base_renewal_period,quoted_unit_price,domain' /><%=
billing.currency_symbol.html %><%= billing.price(product.unit_price,
:use_tax_prefs) %>
<% if product.base_renewal_period != 'never' %>
every <%= product.unit_period.to_s_short.html %>
<% end %>
<% if product.setup_fee != 0 %>
plus a one off fee of <%= billing.currency_symbol.html %><%=
sprintf("%.2f", if billing.include_tax? then
billing.price(product.setup_fee) else product.setup_fee end) %>
<% end %>
<% if product.has_free_products? %>
<br />
includes free domain* or transfer**<br /><br /><br />
<% end %>
</p>

I have been searching the internet for a few days and have discovered
that in some of these templates, there is a spare <% end %> which I have
even tried removing/playing with.

Currently this displays six different web hosting package top-down. I
want them in a table, and, preferably, in order such as..

Basic 1 Advanced 1 Pro 1
info info info
buy buy buy

Basic 2 Advanced 2 Pro 2
info info info
buy buy buy

The page is working currently using;

<% i = 0 %>
<% hosting_products.each do | product | %>
<h4><%= product.name.html %></h4>
<p><%= product.description %></p>
<input type='hidden' name='base_renewal_period-<%= i %>' value="<%=
product.base_renewal_period %>" />
<input type='hidden' name='quoted_unit_price-<%= i %>' value="<%=
billing.price(product.unit_price) %>" />
<p><input type='radio' name='add-product' value='<%=
product.specific_type.html %>:<%= i
%>:base_renewal_period,quoted_unit_price,domain' /><%=
billing.currency_symbol.html %><%= billing.price(product.unit_price,
:use_tax_prefs) %>
<% if product.base_renewal_period != 'never' %>
every <%= product.unit_period.to_s_short.html %>
<% end %>
<% if product.setup_fee != 0 %>
plus a one off fee of <%= billing.currency_symbol.html %><%=
sprintf("%.2f", if billing.include_tax? then
billing.price(product.setup_fee) else product.setup_fee end) %>
<% end %>
<% if product.has_free_products? %>
<br />
includes free domain* or transfer**<br /><br /><br />
<% end %>
</p>
<% i = i + 1 %>
<% end %>

<p><input type='submit' value='Add to Basket'/></p>
</form>
<% unless basket.nil? or basket.empty? or no_upsell? %>
<p><a href='basket?add-no-product=package'>No thank you, please continue
with my order ....</a></p>
<% end %>
<% if not billing.tax_applies? %>
<% elsif billing.include_tax? %>
  <p>* Includes <%= billing.tax_name %></p>
<% else %>
  <p>* Excluding <%= billing.tax_name %></p>
<% end %>

Thanks for reading. I really hope somebody can point me in the right
direction :sunglasses:

···

--
Posted via http://www.ruby-forum.com/.

I want it displayed in a table (where I can also add a background and
styling). I have tried all sorts of methods but I can not get it to work
(the page displays an internal error with no explanation)

Unlikely -- look in your log file.

From what the advice says in the file, this should work (but doesn't);

<http://catb.org/~esr/faqs/smart-questions.html&gt;

···

On Mon, Oct 3, 2011 at 8:41 AM, tom didcote <uwtommydj@hotmail.com> wrote:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan