Hi folks, can you spare some time? i could sure use it.

This is the error message :

 ArgumentError in Store#save_order

Showing app/views/store/checkout.html.erb where line #10 raised:

interning empty string

Extracted source (around line #10):

7:     <h4>All fields marked with * are required</h4>
8:
9:     <% form_for :order, :url => { :action => :save_order } do |
form| %>
10:         <%= form.error_messages %>
11:         <fieldset>
12:             <history>
13:

!!i get this error when i try to submit an empty form or any data !!

this is the save_order, mentioned in the error message
def save_order

   @order = Order.new(params[:order])
   if @order.save
     @cart = find_cart
     @order.add_line_items_from_cart(@cart)
     session[:cart] = nil
     flash[:notice]="Order placed successfully! "
     redirect_to :action => 'show_order_details'
   else
      render :action => 'checkout'
   end

end
=========================
this is the code's view :

<% form_for :order, :url => { :action => :save_order } do |form| %>
        <%= form.error_messages %>
        <fieldset>
            <history>
                <h4>
                    Total worth of your books is
                    <span style="color:black"><%=
currency_euro(@cart.total_price_of_products) %></span>
                </h4>
            </history>
            <div>
                <%= form.label :name, "*Name " %>
                <%= form.text_field :name, :size => 30 %>
            </div>
            <div>
                <%= form.label :surmane, "*Surname " %>
                <%= form.text_field :surname, :size => 30 %>
            </div>
            <div>
                <%= form.label :adress, "*Adress " %>
                <%= form.text_area :adress, :rows => 4, :cols => 35 %>
            </div>
            <div>
                <%= form.label :telephone, "*Telephone " %>
                <%= form.text_field :telephone, :size => 30 %>
            </div>
            <div>
                <%= form.label :email, "*Email " %>
                <%= form.text_field :email, :size => 30 %>
            </div>
            <div>
                <%= form.label :pay_type,"*Pay type " %>
                <%= form.select :pay_type,Order::PAYMENT_TYPES,:prompt
=> "Select a payment method" %>
            </div>
            <%= submit_tag "Place order", :name => nil, :class =>
"submit" %>
          </fieldset>
    <% end %>
===========================================

so my question is...what is the message saying, and how should i fix
this problem??

a billion thx in advance,
radu

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to