How use helper method in lambda function?

question

#1

I am going to use helper method in lambda function.

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

After deploying, I am getting this error.
uninitialized constant ApplicationHelper


#2

Been pretty swamped. This will help though:

Hope others will also chime in. Thanks!


#3

It works properly.
Thank you, @tung :+1: