handle back button on device

// Expert user has replied.
W WAN NOR AINIE W MUHAMAD 3 years 5 months ago
4 1 0

Hye all,
Anyone know how to code the back button on device? Example if I on 3rd screen when I press the back button on device it  go on 2nd screen. But now, I on 3rd screen then when I press back button, it go to main screen.please help me.

Please Register or Login to post a reply

1 Replies

B Bhakta Ranjan Satapathy

Hi,
you can try below code.
  def index
    # your codes   
    render :back => '/app'     
  end

Thanks

CONTACT
Can’t find what you’re looking for?