Hello I'm a newbie,

Our server went down recently and now I'm getting page not found when I try
to purchase a product.

Ruby 1.9.3, Rails 3.21



Here's the information from the log file.

ActionView::Template::Error (comparison of Fixnum with nil failed):

3: <% end %>

4: <div id="checkout">

5: <h1><%= t("checkout")%></h1>

6: <%= checkout_progress %>

7: <br clear="left" />

8: <%= render "shared/error_messages", :target => @order %>

9: <%if @order.state != "confirm"%>

app/helpers/checkout_helper.rb:16:in `<'

app/helpers/checkout_helper.rb:16:in `checkout_progress'

app/helpers/checkout_helper.rb:9:in `map'

app/helpers/checkout_helper.rb:9:in `checkout_progress'

app/views/checkout/edit.html.erb:6:in
`_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'



app/views/checkout/edit.html.erb

<% content_for :head do %>
<%= javascript_include_tag 'checkout', '/states' %>
<% end %>
<div id="checkout">
<h1><%= t("checkout")%></h1>
<%= checkout_progress %>
<br clear="left" />
<%= render "shared/error_messages", :target => @order %>
<%if @order.state != "confirm"%>
<%= hook :checkout_summary_box do %>
<div id="checkout-summary" class="alt">
<%= render 'summary', :order => @order %>
</div>
<% end %>
<%end%>
<div id="address_form_container">
<%= form_for @order, :url => update_checkout_path(@order.state), :html
=> { :id => "*checkout_form_#{@order.state* <checkout_form_#{@order.state>}"
} do |form| %>
<%= render @order.state, :form => form %>
<input id="post-final" type="submit" style="display:none"/>
<% end %>
</div>
</div>

Any ideas?

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3zxTdricce4J.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Oscar Del Ben at Jul 17, 2012 at 7:49 pm
    the error is in checkout_helper line 16. Can you post that method?

    --
    Oscar Del Ben
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

    On Tuesday, July 17, 2012 at 12:46 PM, yatta20 wrote:


    Hello I'm a newbie,


    Our server went down recently and now I'm getting page not found when I try to purchase a product.


    Ruby 1.9.3, Rails 3.21





    Here's the information from the log file.


    ActionView::Template::Error (comparison of Fixnum with nil failed):


    3: <% end %>


    4: <div id="checkout">


    5: <h1><%= t("checkout")%></h1>


    6: <%= checkout_progress %>


    7: <br clear="left" />


    8: <%= render "shared/error_messages", :target => @order %>


    9: <%if @order.state != "confirm"%>


    app/helpers/checkout_helper.rb:16:in `<'


    app/helpers/checkout_helper.rb:16:in `checkout_progress'


    app/helpers/checkout_helper.rb:9:in `map'


    app/helpers/checkout_helper.rb:9:in `checkout_progress'


    app/views/checkout/edit.html.erb:6:in `_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'





    app/views/checkout/edit.html.erb


    <% content_for :head do %>
    <%= javascript_include_tag 'checkout', '/states' %>
    <% end %>
    <div id="checkout">
    <h1><%= t("checkout")%></h1>
    <%= checkout_progress %>
    <br clear="left" />
    <%= render "shared/error_messages", :target => @order %>
    <%if @order.state != "confirm"%>
    <%= hook :checkout_summary_box do %>
    <div id="checkout-summary" class="alt">
    <%= render 'summary', :order => @order %>
    </div>
    <% end %>
    <%end%>
    <div id="address_form_container">
    <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state (mailto:checkout_form_#{@order.state)}" } do |form| %>
    <%= render @order.state, :form => form %>
    <input id="post-final" type="submit" style="display:none"/>
    <% end %>
    </div>
    </div>


    Any ideas?


    --
    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 rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3zxTdricce4J.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Yatta20 at Jul 17, 2012 at 7:55 pm

    On Tuesday, July 17, 2012 3:46:55 PM UTC-4, yatta20 wrote:
    Hello I'm a newbie,

    Our server went down recently and now I'm getting page not found when I
    try to purchase a product.

    Ruby 1.9.3, Rails 3.21



    Here's the information from the log file.

    ActionView::Template::Error (comparison of Fixnum with nil failed):

    3: <% end %>

    4: <div id="checkout">

    5: <h1><%= t("checkout")%></h1>

    6: <%= checkout_progress %>

    7: <br clear="left" />

    8: <%= render "shared/error_messages", :target => @order %>

    9: <%if @order.state != "confirm"%>

    app/helpers/checkout_helper.rb:16:in `<'

    app/helpers/checkout_helper.rb:16:in `checkout_progress'

    app/helpers/checkout_helper.rb:9:in `map'

    app/helpers/checkout_helper.rb:9:in `checkout_progress'

    app/views/checkout/edit.html.erb:6:in
    `_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'



    app/views/checkout/edit.html.erb

    <% content_for :head do %>
    <%= javascript_include_tag 'checkout', '/states' %>
    <% end %>
    <div id="checkout">
    <h1><%= t("checkout")%></h1>
    <%= checkout_progress %>
    <br clear="left" />
    <%= render "shared/error_messages", :target => @order %>
    <%if @order.state != "confirm"%>
    <%= hook :checkout_summary_box do %>
    <div id="checkout-summary" class="alt">
    <%= render 'summary', :order => @order %>
    </div>
    <% end %>
    <%end%>
    <div id="address_form_container">
    <%= form_for @order, :url => update_checkout_path(@order.state), :html
    => { :id => "*checkout_form_#{@order.state*<checkout_form_#%7B@order.state>}"
    } do |form| %>
    <%= render @order.state, :form => form %>
    <input id="post-final" type="submit" style="display:none"/>
    <% end %>
    </div>
    </div>

    Any ideas?
    Checkout help
    module CheckoutHelper
    def checkout_progress
    if Gateway.current and Gateway.current.payment_profiles_supported?
    states = %w(address delivery payment confirm complete)
    else
    states = %w(address delivery payment complete)
    end
    items = states.map do |state|
    text = t("order_state.#{state}").titleize
    css_classes = []
    current_index = states.index(@order.state)
    state_index = states.index(state)
    if state_index < current_index
    css_classes << 'completed'
    text = link_to text, checkout_state_path(state)
    end
    css_classes << 'next' if state_index == current_index + 1
    css_classes << 'current' if state == @order.state
    css_classes << 'first' if state_index == 0
    css_classes << 'last' if state_index == states.length - 1
    # It'd be nice to have separate classes but combining them with a
    dash helps out for IE6 which only sees the last class
    content_tag('li', content_tag('span', text), :class =>
    css_classes.join('-'))
    end
    content_tag('ol', raw(items.join("\n")), :class => 'progress-steps',
    :id => "checkout-step-#{@order.state}")
    end

    def address_field(form, method, id_prefix = "b", &handler)
    content_tag :p, :id => [id_prefix, method].join, :class => "field" do
    if handler
    handler.call
    else
    is_required = Address.required_fields.include?(method)
    separator = is_required ? '<span class="req">*</span><br />' :
    '<br />'
    form.label(method) + separator.html_safe +
    form.text_field(method, :class => is_required ? 'required' : nil)
    end
    end
    end
    def address_state(form, country)
    country ||= Country.find(Spree::Config[:default_country_id])
    have_states = !country.states.empty?
    state_elements = [
    form.collection_select(:state_id, country.states.order(:name),
    :id, :name,
    {:include_blank => true},
    {:class => have_states ? "required" :
    "hidden",
    :disabled => !have_states}) +
    form.text_field(:state_name,
    :class => !have_states ? "required" : "hidden",
    :disabled => have_states)
    ].join.gsub('"', "'").gsub("\n", "")
    form.label(:state, t(:state)) + '<span class="req">*</span><br
    />'.html_safe +
    content_tag(:noscript, form.text_field(:state_name, :class =>
    'required')) +
    javascript_tag("document.write(\"#{state_elements.html_safe}\");")
    end
    end


    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QMOLhp6QU4AJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Oscar Del Ben at Jul 17, 2012 at 7:58 pm
    if state_index < current_index
    either one or the other is nil, that's your problem.

    --
    Oscar Del Ben
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

    On Tuesday, July 17, 2012 at 12:55 PM, yatta20 wrote:

    On Tuesday, July 17, 2012 3:46:55 PM UTC-4, yatta20 wrote:

    Hello I'm a newbie,


    Our server went down recently and now I'm getting page not found when I try to purchase a product.


    Ruby 1.9.3, Rails 3.21





    Here's the information from the log file.


    ActionView::Template::Error (comparison of Fixnum with nil failed):


    3: <% end %>


    4: <div id="checkout">


    5: <h1><%= t("checkout")%></h1>


    6: <%= checkout_progress %>


    7: <br clear="left" />


    8: <%= render "shared/error_messages", :target => @order %>


    9: <%if @order.state != "confirm"%>


    app/helpers/checkout_helper.rb:16:in `<'


    app/helpers/checkout_helper.rb:16:in `checkout_progress'


    app/helpers/checkout_helper.rb:9:in `map'


    app/helpers/checkout_helper.rb:9:in `checkout_progress'


    app/views/checkout/edit.html.erb:6:in `_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'





    app/views/checkout/edit.html.erb


    <% content_for :head do %>
    <%= javascript_include_tag 'checkout', '/states' %>
    <% end %>
    <div id="checkout">
    <h1><%= t("checkout")%></h1>
    <%= checkout_progress %>
    <br clear="left" />
    <%= render "shared/error_messages", :target => @order %>
    <%if @order.state != "confirm"%>
    <%= hook :checkout_summary_box do %>
    <div id="checkout-summary" class="alt">
    <%= render 'summary', :order => @order %>
    </div>
    <% end %>
    <%end%>
    <div id="address_form_container">
    <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state (mailto:checkout_form_#%7B@order.state)}" } do |form| %>
    <%= render @order.state, :form => form %>
    <input id="post-final" type="submit" style="display:none"/>
    <% end %>
    </div>
    </div>


    Any ideas?
    Checkout help
    module CheckoutHelper
    def checkout_progress
    if Gateway.current and Gateway.current.payment_profiles_supported?
    states = %w(address delivery payment confirm complete)
    else
    states = %w(address delivery payment complete)
    end
    items = states.map do |state|
    text = t("order_state.#{state}").titleize
    css_classes = []
    current_index = states.index(@order.state)
    state_index = states.index(state)
    if state_index < current_index
    css_classes << 'completed'
    text = link_to text, checkout_state_path(state)
    end
    css_classes << 'next' if state_index == current_index + 1
    css_classes << 'current' if state == @order.state
    css_classes << 'first' if state_index == 0
    css_classes << 'last' if state_index == states.length - 1
    # It'd be nice to have separate classes but combining them with a dash helps out for IE6 which only sees the last class
    content_tag('li', content_tag('span', text), :class => css_classes.join('-'))
    end
    content_tag('ol', raw(items.join("\n")), :class => 'progress-steps', :id => "checkout-step-#{@order.state (mailto:checkout-step-#{@order.state)}")
    end

    def address_field(form, method, id_prefix = "b", &handler)
    content_tag :p, :id => [id_prefix, method].join, :class => "field" do
    if handler
    handler.call
    else
    is_required = Address.required_fields.include?(method)
    separator = is_required ? '<span class="req">*</span><br />' : '<br />'
    form.label(method) + separator.html_safe +
    form.text_field(method, :class => is_required ? 'required' : nil)
    end
    end
    end
    def address_state(form, country)
    country ||= Country.find(Spree::Config[:default_country_id])
    have_states = !country.states.empty?
    state_elements = [
    form.collection_select(:state_id, country.states.order(:name),
    :id, :name,
    {:include_blank => true},
    {:class => have_states ? "required" : "hidden",
    :disabled => !have_states}) +
    form.text_field(:state_name,
    :class => !have_states ? "required" : "hidden",
    :disabled => have_states)
    ].join.gsub('"', "'").gsub("\n", "")
    form.label(:state, t(:state)) + '<span class="req">*</span><br />'.html_safe +
    content_tag(:noscript, form.text_field(:state_name, :class => 'required')) +
    javascript_tag("document.write(\"#{state_elements.html_safe}\");")
    end
    end


    --
    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 rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QMOLhp6QU4AJ.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Yatta20 at Jul 17, 2012 at 8:07 pm

    On Tuesday, July 17, 2012 3:58:34 PM UTC-4, Oscar Del Ben wrote:
    if state_index < current_index
    either one or the other is nil, that's your problem.

    --
    Oscar Del Ben
    Sent with Sparrow <http://www.sparrowmailapp.com/?sig>

    Hi Oscar,
    I'm very new. Do I need to delete the block of code "if state_index <
    current_index" ?
    On Tuesday, July 17, 2012 at 12:55 PM, yatta20 wrote:


    On Tuesday, July 17, 2012 3:46:55 PM UTC-4, yatta20 wrote:

    Hello I'm a newbie,

    Our server went down recently and now I'm getting page not found when I
    try to purchase a product.

    Ruby 1.9.3, Rails 3.21



    Here's the information from the log file.

    ActionView::Template::Error (comparison of Fixnum with nil failed):

    3: <% end %>

    4: <div id="checkout">

    5: <h1><%= t("checkout")%></h1>

    6: <%= checkout_progress %>

    7: <br clear="left" />

    8: <%= render "shared/error_messages", :target => @order %>

    9: <%if @order.state != "confirm"%>

    app/helpers/checkout_helper.rb:16:in `<'

    app/helpers/checkout_helper.rb:16:in `checkout_progress'

    app/helpers/checkout_helper.rb:9:in `map'

    app/helpers/checkout_helper.rb:9:in `checkout_progress'

    app/views/checkout/edit.html.erb:6:in
    `_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'



    app/views/checkout/edit.html.erb

    <% content_for :head do %>
    <%= javascript_include_tag 'checkout', '/states' %>
    <% end %>
    <div id="checkout">
    <h1><%= t("checkout")%></h1>
    <%= checkout_progress %>
    <br clear="left" />
    <%= render "shared/error_messages", :target => @order %>
    <%if @order.state != "confirm"%>
    <%= hook :checkout_summary_box do %>
    <div id="checkout-summary" class="alt">
    <%= render 'summary', :order => @order %>
    </div>
    <% end %>
    <%end%>
    <div id="address_form_container">
    <%= form_for @order, :url => update_checkout_path(@order.state), :html
    => { :id => "*checkout_form_#{@order.state*<checkout_form_#%7B@order.state>}"
    } do |form| %>
    <%= render @order.state, :form => form %>
    <input id="post-final" type="submit" style="display:none"/>
    <% end %>
    </div>
    </div>

    Any ideas?

    Checkout help
    module CheckoutHelper
    def checkout_progress
    if Gateway.current and Gateway.current.payment_profiles_supported?
    states = %w(address delivery payment confirm complete)
    else
    states = %w(address delivery payment complete)
    end
    items = states.map do |state|
    text = t("order_state.#{state}").titleize
    css_classes = []
    current_index = states.index(@order.state)
    state_index = states.index(state)
    if state_index < current_index
    css_classes << 'completed'
    text = link_to text, checkout_state_path(state)
    end
    css_classes << 'next' if state_index == current_index + 1
    css_classes << 'current' if state == @order.state
    css_classes << 'first' if state_index == 0
    css_classes << 'last' if state_index == states.length - 1
    # It'd be nice to have separate classes but combining them with a
    dash helps out for IE6 which only sees the last class
    content_tag('li', content_tag('span', text), :class =>
    css_classes.join('-'))
    end
    content_tag('ol', raw(items.join("\n")), :class => 'progress-steps',
    :id => "checkout-step-#{@order.state}")
    end

    def address_field(form, method, id_prefix = "b", &handler)
    content_tag :p, :id => [id_prefix, method].join, :class => "field" do
    if handler
    handler.call
    else
    is_required = Address.required_fields.include?(method)
    separator = is_required ? '<span class="req">*</span><br />' :
    '<br />'
    form.label(method) + separator.html_safe +
    form.text_field(method, :class => is_required ? 'required' : nil)
    end
    end
    end
    def address_state(form, country)
    country ||= Country.find(Spree::Config[:default_country_id])
    have_states = !country.states.empty?
    state_elements = [
    form.collection_select(:state_id, country.states.order(:name),
    :id, :name,
    {:include_blank => true},
    {:class => have_states ? "required" :
    "hidden",
    :disabled => !have_states}) +
    form.text_field(:state_name,
    :class => !have_states ? "required" : "hidden",
    :disabled => have_states)
    ].join.gsub('"', "'").gsub("\n", "")
    form.label(:state, t(:state)) + '<span class="req">*</span><br
    />'.html_safe +
    content_tag(:noscript, form.text_field(:state_name, :class =>
    'required')) +
    javascript_tag("document.write(\"#{state_elements.html_safe}\");")
    end
    end


    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/QMOLhp6QU4AJ.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MfdUXSarhFAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Oscar Del Ben at Jul 17, 2012 at 8:09 pm
    No, and we can't help you here because it really depends on the business logic. I recommend you find someone (offline) experienced that helps you with that problem.

    --
    Oscar Del Ben
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

    On Tuesday, July 17, 2012 at 1:07 PM, yatta20 wrote:

    On Tuesday, July 17, 2012 3:58:34 PM UTC-4, Oscar Del Ben wrote:
    if state_index < current_index
    either one or the other is nil, that's your problem.

    --
    Oscar Del Ben
    Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

    Hi Oscar,
    I'm very new. Do I need to delete the block of code "if state_index < current_index" ?
    On Tuesday, July 17, 2012 at 12:55 PM, yatta20 wrote:

    On Tuesday, July 17, 2012 3:46:55 PM UTC-4, yatta20 wrote:

    Hello I'm a newbie,


    Our server went down recently and now I'm getting page not found when I try to purchase a product.


    Ruby 1.9.3, Rails 3.21





    Here's the information from the log file.


    ActionView::Template::Error (comparison of Fixnum with nil failed):


    3: <% end %>


    4: <div id="checkout">


    5: <h1><%= t("checkout")%></h1>


    6: <%= checkout_progress %>


    7: <br clear="left" />


    8: <%= render "shared/error_messages", :target => @order %>


    9: <%if @order.state != "confirm"%>


    app/helpers/checkout_helper.rb:16:in `<'


    app/helpers/checkout_helper.rb:16:in `checkout_progress'


    app/helpers/checkout_helper.rb:9:in `map'


    app/helpers/checkout_helper.rb:9:in `checkout_progress'


    app/views/checkout/edit.html.erb:6:in `_app_views_checkout_edit_html_erb___1936024257_23456254125680_0'





    app/views/checkout/edit.html.erb


    <% content_for :head do %>
    <%= javascript_include_tag 'checkout', '/states' %>
    <% end %>
    <div id="checkout">
    <h1><%= t("checkout")%></h1>
    <%= checkout_progress %>
    <br clear="left" />
    <%= render "shared/error_messages", :target => @order %>
    <%if @order.state != "confirm"%>
    <%= hook :checkout_summary_box do %>
    <div id="checkout-summary" class="alt">
    <%= render 'summary', :order => @order %>
    </div>
    <% end %>
    <%end%>
    <div id="address_form_container">
    <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state (mailto:checkout_form_#%7B@order.state)}" } do |form| %>
    <%= render @order.state, :form => form %>
    <input id="post-final" type="submit" style="display:none"/>
    <% end %>
    </div>
    </div>


    Any ideas?

    Checkout help
    module CheckoutHelper
    def checkout_progress
    if Gateway.current and Gateway.current.payment_profiles_supported?
    states = %w(address delivery payment confirm complete)
    else
    states = %w(address delivery payment complete)
    end
    items = states.map do |state|
    text = t("order_state.#{state}").titleize
    css_classes = []
    current_index = states.index(@order.state)
    state_index = states.index(state)
    if state_index < current_index
    css_classes << 'completed'
    text = link_to text, checkout_state_path(state)
    end
    css_classes << 'next' if state_index == current_index + 1
    css_classes << 'current' if state == @order.state
    css_classes << 'first' if state_index == 0
    css_classes << 'last' if state_index == states.length - 1
    # It'd be nice to have separate classes but combining them with a dash helps out for IE6 which only sees the last class
    content_tag('li', content_tag('span', text), :class => css_classes.join('-'))
    end
    content_tag('ol', raw(items.join("\n")), :class => 'progress-steps', :id => "checkout-step-#{@order.state (mailto:checkout-step-#%7b@order.state)}")
    end

    def address_field(form, method, id_prefix = "b", &handler)
    content_tag :p, :id => [id_prefix, method].join, :class => "field" do
    if handler
    handler.call
    else
    is_required = Address.required_fields.include?(method)
    separator = is_required ? '<span class="req">*</span><br />' : '<br />'
    form.label(method) + separator.html_safe +
    form.text_field(method, :class => is_required ? 'required' : nil)
    end
    end
    end
    def address_state(form, country)
    country ||= Country.find(Spree::Config[:default_country_id])
    have_states = !country.states.empty?
    state_elements = [
    form.collection_select(:state_id, country.states.order(:name),
    :id, :name,
    {:include_blank => true},
    {:class => have_states ? "required" : "hidden",
    :disabled => !have_states}) +
    form.text_field(:state_name,
    :class => !have_states ? "required" : "hidden",
    :disabled => have_states)
    ].join.gsub('"', "'").gsub("\n", "")
    form.label(:state, t(:state)) + '<span class="req">*</span><br />'.html_safe +
    content_tag(:noscript, form.text_field(:state_name, :class => 'required')) +
    javascript_tag("document.write(\"#{state_elements.html_safe}\");")
    end
    end


    --
    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 rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QMOLhp6QU4AJ.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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 rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MfdUXSarhFAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Yatta20 at Jul 17, 2012 at 8:20 pm

    On Tuesday, July 17, 2012 4:09:36 PM UTC-4, Oscar Del Ben wrote:
    No, and we can't help you here because it really depends on the business
    logic. I recommend you find someone (offline) experienced that helps you
    with that problem.

    --
    Oscar Del Ben
    Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
    Ok thank you


    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/odEjReAosDIJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Colin Law at Jul 17, 2012 at 8:24 pm

    On 17 July 2012 21:20, yatta20 wrote:
    On Tuesday, July 17, 2012 4:09:36 PM UTC-4, Oscar Del Ben wrote:

    No, and we can't help you here because it really depends on the business
    logic. I recommend you find someone (offline) experienced that helps you
    with that problem.

    --
    Oscar Del Ben
    Sent with Sparrow

    Ok thank you
    If it used to work and now does not then something must have changed.
    Perhaps you can work out what has changed somehow.

    Colin

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Yatta20 at Jul 17, 2012 at 8:52 pm

    On Tuesday, July 17, 2012 4:24:10 PM UTC-4, Colin Law wrote:
    On 17 July 2012 21:20, yatta20 wrote:
    On Tuesday, July 17, 2012 4:09:36 PM UTC-4, Oscar Del Ben wrote:

    No, and we can't help you here because it really depends on the
    business
    logic. I recommend you find someone (offline) experienced that helps
    you
    with that problem.

    --
    Oscar Del Ben
    Sent with Sparrow

    Ok thank you
    If it used to work and now does not then something must have changed.
    Perhaps you can work out what has changed somehow.

    Colin
    It's been working for months. That was my thought process as well. I
    contacted the IT about his changes to the server.

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MVejKZbvxmkJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Chris Whitman at Jul 29, 2012 at 8:47 pm
    Caused by the cart (or order, maybe) looking for some data that is not
    there, probably. It can be avoided by using another user. Or maybe also by
    clearing that users cart.

    What I can say for sure is this: it is user/order/cart[line item] related
    and it's not just happening in this one case.

    Could very well be a bug, sorry I'm unable to help or post the issue on
    Github with more detail.


    On Tuesday, July 17, 2012 1:24:10 PM UTC-7, Colin Law wrote:
    On 17 July 2012 21:20, yatta20 wrote:
    On Tuesday, July 17, 2012 4:09:36 PM UTC-4, Oscar Del Ben wrote:

    No, and we can't help you here because it really depends on the
    business
    logic. I recommend you find someone (offline) experienced that helps
    you
    with that problem.

    --
    Oscar Del Ben
    Sent with Sparrow

    Ok thank you
    If it used to work and now does not then something must have changed.
    Perhaps you can work out what has changed somehow.

    Colin
    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/7Sm6YcUcZvsJ.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJul 17, '12 at 7:47p
activeJul 29, '12 at 8:47p
posts10
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase