The following controller method taking me into infinite loop. Once the
update action completes I want to reload the ‘index’ page. May I know
why it is going into infinite loop?
First of all params incoming with the requests are strings. You expect
it
to be Fixnum (0), rather than a String (‘0’). params[:anything] cannot
be
== 0, because if it is “zero”, it will be received as “0” in the
controller. Just use this in the conditional and report with whether it
succeeded or is still failing, in which case I’d ask you to provide
INDEX
action of the same controller, and before filters that affect
Devices#index
action (replaced 0 with ‘0’):