On Wed, 22 Aug 2018 at 17:17, Joe Guerra <jgue...@jginfosys.com> wrote:
>
> Yes, in the product controller?
>
> In
> Def show
> End

That is not a page that is a controller action, which invokes a view.
It is important to use the correct words or others will not know what
you mean.  By page I assumed you meant the view.  But surely you are
not changing the quantity in that action, I would have expected a
change in quantity to be in an Update action.

Colin

>
> On Wed, Aug 22, 2018, 12:00 PM Colin Law, <clan...@gmail.com> wrote:
>>
>> On Wed, 22 Aug 2018 at 16:54, Joe Guerra <jgue...@jginfosys.com> wrote:
>> >
>> > Ok, since it's on the show page I can check for that (and it did work on 
>> > that page), but as soon as it is added I think I need to redirect to 
>> > another page,
>>
>> You shouldn't be doing it in a view at all, you should do it in the
>> action or model that updates the quantity, when it sees it is zero.
>>
>> Colin
>>
>> >
>> > (because I don't display items that are fully funded and i got a page not 
>> > found message 404)...  I'll try it soon.  Some sort of congratulations 
>> > page - "we have met the target , blah blah blah..."
>> >
>> > Thanks,
>> > Joe
>> >
>> >
>> > On Wednesday, August 22, 2018 at 11:46:26 AM UTC-4, Colin Law wrote:
>> >>
>> >> On Wed, 22 Aug 2018 at 16:31, Joe Guerra <jgu...@jginfosys.com> wrote:
>> >> >
>> >> > ok, well I need to flip a few boolean values to begin the group order 
>> >> > process.
>> >>
>> >> Oh, you mean that when the amount goes to zero you need to take some
>> >> action?  In that case that should probably be initiated by the action
>> >> that sets it zero, either directly on updating it to zero or possibly
>> >> in an after filter.  Or have a background job that looks for zero and
>> >> takes the appropriate action.
>> >>
>> >> Colin
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Ruby on Rails: Talk" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to rubyonrails-talk+unsubscr...@googlegroups.com.
>> > To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/rubyonrails-talk/91aca44e-776b-4b8d-85da-c053b05eedbd%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to rubyonrails-talk+unsubscr...@googlegroups.com.
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvxgjsweG1RkY1UR2s0DQt5zBswyPgJMNtCffGB2zAJeg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAMmp1BhL1Bi8OxTbMkYunUb5KunRc6LgyKPGQpX9mfCacA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu9ZEqhfOiAijJ-azKvqO7edysG%3DMjMVa679dVXp5sfoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to