[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.15.3
Jets
2.3.16
Ruby
2.7.0
Expected Behaviour
I am going to use helper method in lambda function.
I have added include ApplicationHelper in app/functions/my_function.rb
Current Behavior
But I am getting the error -
uninitialized constant ApplicationHelper
Code Sample
app/functions/my_function.rb
include ApplicationHelper
def lambda_handler(event:, context:)
puts event
puts context
# get_event_details is defined in ApplicationHelper
details = get_event_details(event)
end
app/helpers/application_helper.rb
module ApplicationHelper
def get_event_details(event)
#code
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 am going to use helper method in lambda function. I have added
include ApplicationHelper
in app/functions/my_function.rbCurrent Behavior
But I am getting the error - uninitialized constant ApplicationHelper
Code Sample
app/functions/my_function.rb
app/helpers/application_helper.rb