[x] Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a jets upgrade command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/
[x] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.rubyonjets.com
[x] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software
Version
Operating System
MacOS 10.14.6
Jets
2.1.1
Ruby
2.5.3
Expected Behaviour
I expect to be able to use the redirect_back method defined in ActionController within a jets controller.
Current Behavior
Calling redirect_back fails with the following NameError:
undefined local variable or method `redirect_back`for MY_CONTROLLER
Step-by-step reproduction instructions
Try calling redirect_back in any controller action.
Code Sample
class PagesController < ApplicationController
def create
@page = Page.new(pages_params)
if @page.save
redirect_to pages_url
else
redirect_back
end
end
end
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
I expect to be able to use the
redirect_back
method defined in ActionController within a jets controller.Current Behavior
Calling
redirect_back
fails with the followingNameError
:Step-by-step reproduction instructions
Try calling
redirect_back
in any controller action.Code Sample