Is there a way to check the current page from the controller? I tried
current_page?
but that returns an error :
undefined method 'current_page?'
In the controller action and view the following helpers are available:
controller_name
action_name
You can guess from its' names, what each does.
try to check like this in view
logger.info("--------#{params[:controller]}-------------")
logger.info("--------#{params[:action]}-------------")
see in log of terminal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With